Test Your WordPress Site Locally tutorial will show you how to run your live website locally using Xampp. I will be using BackWPup backup to install and setup my live website locally for testing using Xampp and Windows 7.
Last Updated: July 16, 2016
Important Information: These steps can be applied to just about any backup plugin as long as the backup is a full backup which includes all the files, folders and the database.
Latest News: I have added two more links to the menu below.
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)
Test Your WordPress Site Locally Steps
Step 1 ) Start Xampp Apache and MySQL. See image below.
Step 2 ) Locate your BackWPup backup folder locally to copy over to the local server “Xampp”. Remember to unzip the folder, to copy the files. See image below.
Step 3 ) The files are being copied over to the Xampp server “local”. See image below.
Step 4 ) Start phpMyAdmin to import the database from BackWPup folder which was copied over to the Xampp local server. See image below.
Step 5 ) We need to drop all the tables from the local WordPress install before we can import the database. Click on Check All to select all tables. See image below.
Step 6 ) Click on Drop to drop all tables selected. See image below.
Step 7 ) A window will open up asking you “Do you really want to: “, click on Yes. See image below.
Step 8 ) Click on Import and then click on Browse to search for the database to import. Notice that I am allowed to import 128M file size into the database (Please review the first tutorial Install WordPress Locally Using Xampp Step 3 to learn more about making changes to Apache). See image below.
Note: If you have a large database to import, chances are you will receive a time out error message. If that is the case then adjust the following settings.
Xampp File to Adjust
Locate the following entry in the file above and change the entry from $cfg[‘ExecTimeLimit’] = 300; to $cfg[‘ExecTimeLimit’] = 0; and make sure you restart xampp server. Now there is no execution time limit.
If you are importing the database into your online server “Not Xampp” and you do not have Access To a Server:
Option 1: Continue uploading the same gzip, sql, zip, or bzip2 file then the data import process will pick up where it left off.
Option 2: Split SQL File, if you are not uploading SQL directly but have it compressed using gzip, zip, or bzip2 then uncompress the file. Once the file is raw SQL you can open it in a notepad, I prefer NotePad++, and view the contents. You can split the file into however many pieces you like by cutting sections of the file out but make sure that you do it on a table by table basis so the SQL statements are not split in half.
Click on the following URL Import Database to continue with the local set up.
If you have any question please let me know. I will be updating this tutorial from time to time so come back for the latest.
I hope this tutorial helps you.