Install WordPress Locally Using Xampp tutorial will show you how simple it is to set up WordPress on your laptop or desktop. Xampp can be installed on different platforms. I have tested Xampp using the following operating system Windows 7, 8.1, 10 for this tutorial.
Last Updated: July 16, 2016
Latest News: I have reworded some information below.
I will be updating this tutorial when new versions of Xampp are released and or there are major changes to the layout for example XAMPP Control Panel v3.2.2. (New Control Panel version released Nov 12, 2015)
Hint: Remember that your local Xampp installation might be running a different version of Apache, PHP and MySQL. This is important to know especially if you intend to upload the website to your live server.
What you need:
Install WordPress Locally Tutorials:
- Install WordPress Locally Using Xampp
- Install WordPress Locally Page Two
- Install WordPress Locally Security Setup
- Test Your WordPress Site Locally. (Optional if you need to test your live website locally)
- Import Database (Optional = you must complete part 3 above first)
- Edit WP Config File (Optional = you must complete part 4 above first)
Install WordPress Locally Using Xampp Steps
Step 1 ) Install Xampp and follow the on screen instructions to set it up. This should be straight forward. I installed xampp on my second partition.
Troubleshooting xampp: Sometimes you might come across this error “mysql server has gone away” with error code 2006. This occurs because you are trying to import a large database and your settings are preventing this from happening. I will make the changes before I even begin installing WordPress locally.
- Solution Make sure you change both “post_max_size” and “upload_max_filesize” in your “php.ini“ (which is located where your “php.exe” is). See Task 2 below.
Step 2 ) Run Xampp Control Panel and click on Apache -> Config -> PHP (php.ini). See images below.
Step 3 ) Change the following settings to suit your needs. I added 128M, file size to allow me to upload files that are smaller than 128M.
The following image shows a maximum file size of 128M allowed.
Step 4 ) I have also added 128M memory. The memory is based on what you are running locally in your laptop or desktop. Nowadays this is not a problem unless you are running an old system, most desktops and laptops run 4GB or more or ram.
The following image shows 128M of memory limit added.
Step 5 ) The following image shows 240 seconds added. This will allow you to install large plugins and even themes that sometimes are a bit heavy.
Important: The settings will be implemented once you restart Apache and MySQL.
Step 6 ) I created a folder and named it wordpress. You can name your folder what ever makes you happy. Remember: The name because you will require this information later on.
To learn more about giving WordPress it’s own directory please read the following link moving wordpress to it’s own directory.
Note: Installing Xampp will create many files and folders. What you see represents the root of the local server.
Important: Make sure you copy all the files and folder you extracted from the wordpress version you downloaded.
Start Apache and MySQL
Step 7 ) Start Apache and MySQL, if there are any issues an error will appear on the screen. The Module started will display the color green and the Port(s) added to each module.
Please Note: If you are having problems starting XAMPP Control Panel, try the following FAQ Link for Windows.
Step 8 ) Type http://localhost/xampp/ on the browser address bar, then click on phpMyAdmin found on the lefthand side menu under Tools.
Create a new database. I created a new database and named it wordptest. Make sure you set it to utf8_unicode_ci. Click on Create. See image below.
Step 9 ) Click on Add user. See image below.
Step 10 ) Fill out the fields, I created a user with the name testsite. I Generated the password, you can type your own password. See image below.
Step 11 ) Click on Check All to select all privileges. This is very important or else you will have issues when you are working with your wordpress site. In the following image you can see all the privileges assigned to the new user created.
Step 12 ) Leave the default settings as they are, you don’t need to make any changes to these settings. Click on Add user. See image below.
Step 13 ) You can see the new user testsite added to the list. In this example I added the user to “wordptest” database and I made sure all privileges are given. Click on Edit Privileges to edit the user. See image below.
Note: Adding all privileges are added to the user to access the database will prevent errors appearing on your browser when you try to run your website.
Step 14 ) Select the database from the dropdown menu and assign the database to the user you just created. I selected wordptest database, Click on Go. See image below.
This tutorial has illustrated how to setup Xampp, create a WordPress database, add a new user and assign the new user to the database created.
Next tutorial install-wordpress-locally-page-two will show you how to install WordPress.
I hope this tutorial has helped you.