Nov 232014
 

Test Your WordPress Site Locally Edit WP Config File tutorial will show you how to edi the wp-config file and more.

Last Updated: August 17, 2017

Latest News: I have updated the wording and the images.

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.

Test Your WordPress Site Locally Edit WP Config File Steps

Step 1 ) I am going to add the new database name, username and password to the wp-config.php file (Remember this was completed in Part 1 Install WordPress Locally Using Xampp Step 6 through to Step 12). See image below.

import-backwpup-locally-edit-wpconfig

Step 2 ) The table prefix needs to be changed. Open the following file wp-config.php, located on the root of your installation. See image below.

change-table-prefix-local-database-xampp-backwpup

Step 3 ) Locate this line $table_prefix = 'wp_'; on your file and change the default WordPress prefix ‘wp_‘ to the following prefix ‘k4oqobp_(Remember that your prefix will be different). See image below.

edit-wp-admin-php-wordpress-xampp-locally

Table Prefix

Step 4 ) I have now typed the new prefix ‘k4oqobp_‘ (Your prefix will be different). Make sure that you save your changes. See image below.

edit-wp-admin-php-wordpress-xampp-locally-part2

Step 5 ) You will see your path when you go to log into the admin panel on the browser. This is the reason why it is important to make the previous changes or else it defaults back to your online server path which you don’t want.

Log in with your normal username and password. This is the username and password that you use online. See image below.

import-backwpup-local18-new

Step 6 ) If I type http://localhost/wordpress/ on the browser, I will see my website running locally (Please note: Your home path will be different, please visit Part 1 Install WordPress Locally Using Xampp Step 4 to learn more). See image below.

import-backwpup-locally-completed

I have completed the task. I now have my live website running locally using Xampp in Windows 7. Hopefully you have too and can see your website locally as well.

Important: There will be other settings, plugins and links that might need attention. But be aware that if you run the website locally for testing and then decide to upload back to the server, you will have to revert back the changes you made to what they are on your live server. So make a note of what ever changes you make.

If you have any question please let me know.

I hope this tutorial helps you.

Enjoy.

Xampp Tutorial List:

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

  2 Responses to “Test Your WordPress Site Locally Edit WP Config File”

  1. Hi Manuel!

    I followed your instructions exactly, but when I try to go back to the site after importing, I get a blank screen. When I try to login to wordpress, it says the account doesn’t exist. I’m very knew to this so I have no idea what I’m doing wrong. Thanks for the help!

 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)