WordPress is the most popular content management system (CMS) in the world. It's used to power millions of websites around the world and it is completely free to use. Its popularity stems from its ease of use, huge network of support from other users, the availability of hundreds of thousands of plugins and themes, and more.
When building a WordPress-powered website, you may want to host it on your own computer or a computer on your local network. There are many advantages of doing this. First, you can build and test a new website or update a website before it goes live on the internet. Secondly, WordPress works much faster when installed on a local server, and installing it locally can help to speed up website development times.
WordPress uses an SQL database to store data and a server side language called PHP to produce HTML which your internet browser can understand and display. In order to run WordPress on a local computer, you will need to install both SQL and PHP on your computer or local network.
XAMPP, WAMP or MAMP
To install both SQL and PHP, you will need to set up your computer to operate like a web server. In order to do this, you can download a free tool to get you started. For Windows PCs, both XAMPP and WAMP are both popular programs. For iOS, MAMP is the most popular tool on the market.
All of these free programs have the necessary functions to get WordPress up and running. Specifically, you will need to be able to power MySQL databases and process PHP scripts.
Download your software of choice and follow the instructions provided to install and run your chosen software on your computer.
You will need a copy of WordPress. Go to WordPress.org and download the latest stable release of WordPress. Download WordPress and place the extracted files and folders into the correct folder used by your software. For both XAMPP and WAMP, the default location is:
Alternatively, you can put the WordPress files and folders into a subdirectory:
If you are planning on installing multiple WordPress installations, it's best practice to put each one into its own directory.
You will need to create a database before you can start installing WordPress.
Open phpMyAdmin on your local server. For XAMPP, WAMP and MAMP, the default address is:
For more information about how to access phpMyAdmin on your local server, check the instructions provided with your chosen software.
Once logged into phpMyAdmin, click "New" on the menu on the left side of the screen. Enter a database name and click "Create."
Ensure that your newly created database is selected on the menu on the left side and then click "Privileges" on the top menu. Assign a user to have access to your new database and grant them all privileges. You may opt for the default user, called "root," or you can create a new user by clicking on the "Add user account" link.
Keep a note of the database name, username, and password, as you will need them during the installation process.
Now that you have created your database, you are now ready to start installing WordPress. Open your web browser and type "localhost" into the address bar. Depending on how you set up your local server, you may need to use an IP address instead of "localhost."
If you have copied the WordPress files into a subfolder, you'll also need to include that in the address. For example, if you have copied the folders to "C:", then you would need to go to:
WordPress will now start the installation procedure.
On the first screen, select your desired language and click "Continue." On the next screen you will need to enter your database details. Enter the database name, username, and password into the appropriate boxes.
In most cases, you should enter "localhost" where it says "Database Host," but this may differ depending on how you set up your local server.
Normally, you can use the default value for "Table Prefix," but if you plan on using multiple WordPress installations on a single database, you will need to edit this setting.
If you have made a mistake at this stage, you will be shown the "error establishing a database connection" screen. If you see this, go back and make sure the database information is correct. If the information is correct, then you will need to diagnose other potential issues with your local server.
After successfully setting up the database connection, you can click "Run the Install" on the next screen.
You will need to enter some information for the admin account on your new WordPress installation. Here you will need to enter the site title, username, password, and email address. After entering this information, click "Install WordPress."
Finally, you should be presented with the "Success!" screen.
On the "Success!" screen, click "Log In" at the bottom of the page and you will be taken to the login page. Normally, the address would be:
Enter the username and password which you created when setting up the admin account, and you will be directed to the dashboard.
Installing WordPress on a Local Server
After you have set up your local server on your network, setting up WordPress is just as easy as installing it on a normal web server. Setting up local servers can sometimes be problematic, but XAMPP, WAMP, and MAMP all come with comprehensive instructions and have support options available to help you.
You can use WordPress on a local server to create a testing environment on a site which isn't live on the internet and therefore won't negatively affect the user's experience. This is handy if you're trying out new themes or plugins. Moreover, many developers will build websites on local servers before uploading the finished website to a live server, as it's much faster to develop websites locally.