You have a great WordPress website but you want to make some major changes or try some new plugins and don’t want to jeopardise the security and stability of your live website. The easiest way round this is to create a test website. We allow you to create a test website on all our UK WordPress hosting packages.
This post describes how to create a test website.
It presumes you have created a website on a sub domain called test.YOURDOMAINNAME and you have created a new MySQL database, which will be your test database.
Copy Your MySQL Database
Using HeidiSQL or your favourite MySQL database tool, export your current MySQL database to a .sql file.
Then import this .sql file into your new MySQL database.
Next open up the wp_options table and alter the value for ‘siteurl’ (option_id 3) and ‘home’ (option_id 39) to your test URL i.e. test.YOURDOMAINNAME
Copy Your FIles
Copy your existing files from your live website to your test website.
Open your web.config or .htaccess file and alter any rewrite rules you may have.
Open wp-config.php in the root of your WordPress installation and update define(‘HTTP_SERVER’,”) and define(‘HTTPS_SERVER’,”) to test.YOURDOMAINNAME
Your also need to update your MySQL settings in wp-config.php to your test database.
Navigate to Your Test WordPress Website
Open up test.YOURDOMAINNAME and you should now see an exact copy of your live website. Navigate to /wp-admin and login with the same details you use on your live website.
You might need to update any plugins that use your website full URL.