May 142014
 

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:

  1. Xampp
  2. WordPress

Install WordPress Locally Tutorials:

  1. Install WordPress Locally Using Xampp
  2. Install WordPress Locally Page Two
  3. Install WordPress Locally Security Setup
  4. Test Your WordPress Site Locally. (Optional if you need to test your live website locally)
  5. Import Database (Optional = you must complete part 3 above first)
  6. 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.

Install-WordPress-Locally-Using-Xampp-phpini-new

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.

Install-WordPress-Locally-Using-Xampp-file-size

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.

Install-WordPress-Locally-Using-Xampp-memory-limit

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.

backwpup-xampp-local-setup-max-memory

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.

xampp-create-database-locally-new

Step 9 ) Click on Add user. See image below.

Install-WordPress-Locally-Using-Xampp-add-user-button

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.

Install-WordPress-Locally-Using-Xampp-add-details

MySQL Privileges

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.

MySQL Privileges:

  • Data
  • Structure
  • Administration

xampp-user-check-all-privileges-new

 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.

xampp-add-user-resources

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.

xampp-new-user-added-new

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.

xampp-assign-user-to-database

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.

Enjoy

Manuel Ballesta RuizManuel Ballesta Ruiz is a web developer, Blogger and WordPress Enthusiast.

  6 Responses to “Install WordPress Locally Using Xampp”

  1. Also need to add post_max_size=128M to php ini file

    • Hello John, thank you for your comment. Yes I see your point in adding post_max_size=128m, if you read at the beginning you will notice that I have also added that option. I will have to make it more clear.

      Kind regards

  2. Nice tutorial. Complete information on wp installation.

  3. it is the one of the way 2 create the database but there are several ways 2 create the database in xampp server

    • Hello Kalaivanan, thank you for your comment. Yes you are correct there are several ways to create a database. In Xampp this is the best method to create a database. This method is the same method implemented when creating a new database using phpMyAdmin in cpanel on a live server.

      Kind regards

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)