Share
  1. Duplicate the files in cpanel to a website.ext.test folder
  2. Export the database from the live website
  3. Create a new test database with a new user and password
  4. Edit the wp-config with new database, db user, password and unique keys and salts (generate using URL in config file)
  5. Import the database into the test database
  6. Run the SQL commands below on the new test database.
  7. Add a redirect in cpanel to send all non www addresses to www.newsite.ext
  8. Add a redirect in the .htaccess file in cpanel’s file directory to send the subdirectory to the test.newsite.ext address instead
  9. Change the WordPress settings > Privacy to block search engines
  10. Change the WordPress settings > General > Site title to include “test”
  11. Enable sign-in before viewing any pages by installing and activating ‘registered users only’ plugin.
  12. Disable the WordPress settings > Media > ‘Organize my uploads into month- and year-based folders’
  13. Select and change the WordPress settings > Permalinks > Custom Structure to ‘/%category%/%postname%/’

UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-url.com', 'http://www.new-url.com') WHERE option_name = 'home' OR option_name = 'siteurl'; 

UPDATE wp_posts SET guid = replace(guid, 'http://www.old-url.com','http://www.new-url.com'); 

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-url.com', 'http://www.new-url.com');

(These SQL queries are sourced from: http://wordpress.org/support/topic/create-a-test-site)

If you are using Category Redirect to Post or Page plugin:

UPDATE `wp_cat_redirect` SET url = replace(url, 'http://www.uk-move.com', 'http://www.test.uk-move.com');

Update any hard coded menu items manually via the GUI WordPress interface. Most should be relative to the site’s root and not require updating.

 

 

Share

You might also like:

  • No related entries were found