Forums

Creating a duplicate site for testing (3 posts)

  1. jordan8201
    Member
    Posted 2 years ago #

    Hello! One unfortunate thing I have found w/ WP is that I can't customize a new theme w/o it being open to the public. Is there a way to create a duplicate of my site on an alternate location for testing prior to activating the theme on my primary site? I tried a fresh install on a different folder on my domain. I then copied all of the files from my main site to the test site. When I tried running the wp-admin, it routes me to my main sites admin.

    Is there some way to duplicate my WP site on a separate folder?

  2. Mike Little
    Member
    Posted 2 years ago #

    Hi Jordan,

    You need to do two things, firstly, add the following lines to your wp-config.php file in the duplicate folder:

    define('WP_SITEURL', 'http://yourdomain.com/test');
    define('WP_HOME', 'http://yourdomain.com/test');

    just before it says 'stop editing'.

    Secondly, you must also duplicate your database (otherwise you will still be changing things in your main site), and change the database settings in wp-config.php to reference the copied database.

    An alternative strategy is to run a copy of your site on your desktop machine, see http://codex.wordpress.org/Installing_WordPress#Installing_WordPress_on_your_own_Computer

    Mike

  3. jordan8201
    Member
    Posted 2 years ago #

    Awesome, thanks I'll try that.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.