If you’re considering WordPress or if you already have a WordPress website, a local installation provides a perfect testing and learning environment. In this article we’ll look at what a local WordPress installation is and why you may need one. We’ll also explain how to install WordPress on your own computer.
What is a Local WordPress Installation?
WordPress is free to download and use but you still need a domain and hosting that you’ll have to pay for. Your website is stored on your hosting providers’ server and all the files that WordPress needs to work are saved there. This includes all your content like the text, images and video that make your website.
A local installation of WordPress means setting your computer as a server called localhost and installing WordPress directly. This way all the content and working files are located on your own computer and you won’t need to pay for a domain or hosting yet. A locally hosted website is only accessible from the computer it is hosted on and is meant for development and testing before making a website live.
Why Install WordPress Locally?
You may not want to commit to a hosting account if you only want to take WordPress for a “test-drive”. You may also want to create and perfect your website before making it live. By installing WordPress directly, you’ll be able to test, learn and develop on your own computer without hosting or an internet connection.
If You Are New to WordPress
WordPress is often described as being easy to use, but there can be a fairly steep learning curve for beginners. If you are completely new to the world of websites, a local installation of WordPress will give you a platform to learn how to use WordPress and familiarise yourself with the terminology.
For More Advanced Users
If you are already using WordPress, you can use a local installation to safely test and experiment with customising your site by adding and editing code. You can create a clone of your live website on your local computer for testing purposes so that there’s no risk to your live website.
Experienced WordPress Users
WordPress theme and plugin developers use local installations to develop and test their products before making them available to the public. A local WordPress installation is the perfect place to start if you also want to learn how to develop your own themes or plugins.
How to Install WordPress on Your Own Computer
We’re going to use XAMPP to set up a server and the basic requirements for a WordPress website.
Step 1 – Download and Install XAMPP
- Visit the Apache Friends website and download the version of XAMPP for your operating system. (We downloaded the Windows version).
- Be patient as the file is quite large and may take a while to download.
- Run the downloaded file to launch the XAMPP installer. If you’re running antivirus software, you may see a warning message. You can just click Yes here to continue. If you get a warning message on User Control, you can also just click OK.
- You should now see the XAMPP installer screen. Click Next to continue.
- On the next screen you’ll be asked to select the components to install. The only components you really need are MySQL and PHPMyAdmin , but you can leave it as is and click Next to continue.
- You now need to select the folder to install XAMPP in. You can leave this as the default and click Next to continue.
- On the next screen you’ll be asked if you want to Install Bitnami for XAMPP. You don’t need this to install XAMPP so un-check the box and click Next to run the installation.
- You can sit back now while XAMPP is installed.
- When the installation is complete, click Finish to start the control panel.
Step 2 – Start and Test Your Local Server
- Start the Apache and MYSQL modules in the XAMPP control panel.
- When the modules have started, their status will turn green.
You can test that your new local server is working by going to
http://localhost in your browser.
You should now have a working server on your own computer. In the next steps,we’ll create a database and install WordPress.
Step 3 – Create a Database for WordPress
- To Create a database you’ll need to open PHPMyAdmin from your XAMPP control panel.
- Click on the Admin button next to MySQL.
- Click on Databases at the top of the PHPMyAdmin screen.
- Enter a name for your new database and make a note of the name because you’ll need it later on.
- Click the Create button and you should see your new database listed on the left hand side of the screen.
- You can close PHPMyAdmin now.
Step 4 – Create a Folder for Your Local WordPress Installation
- Before you download WordPress, you need to make a folder for the new Installation.
- In your file manger, navigate to the folder where XAMPP is installed. If you followed the steps above, it will be
- Find and open the htdocs folder.
- Inside htdocs, create a folder for your new local WordPress installation. This folder name will be used to access your site. In our example we called it mywebsite.
Step 5 – Download and Install WordPress on Your Computer
- To download the latest version of WordPress you’ll need to go to wordpress.org.
- Click one Get WordPress at the top of the screen.
- Click on the download and install link.
- You can now click on the download button and wait while the zip file is downloaded on your computer.
- Unzip the contents of the downloaded file into the folder you created in step 4.
- Open the folder and find the file
- Rename the file to
wp-config.phpin a text editor.
- Replace ‘database_name_here‘ with the name of the database you created in step 3.
- Replace ‘username_here‘ with ‘root’.
- Edit ‘password_here‘ so that it’s empty.
- Save your changes.
When you visit your local website now, you should see the normal WordPress Installer. The address for your local site will be
http://localhost/FOLDER/ (FOLDER will be the name of the folder you created in step 4).
- Complete the required fields and click the Install WordPress button.
- When the installation is complete you’ll have a brand new WordPress site running on your own computer.