• Resolved GettaNicol

    (@gettanicol)


    I was looking to make a copy of a wordpress site on the same server using the same database. The reason for this is to test a new revamp at the new domain (basically for testing purposes). I have copied all files over to the new directory and installed wordpress.

    The ‘wp-config’ settings have been changed, with a copy of the databse created on the new site. I edited the wp-config.php with the following –

    define(‘WP_HOME’,’https://example.com’);
    define(‘WP_SITEURL’,’https://example.com’);

    To sum up, the orginal wordpress site needs to remain the same and untouched, but the new site, at a new directory on the same server, is to be a copy that we can make amends to for testing. Any help would be greatly appreciated.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • i’d do it like this:
    – (it’d be easier if original wp is installed inside a directory)
    – go to PhpMyAdmin and export the old wp tables to a file .sql (and this is a backup of your original wp, important!)
    – in text editor find/replace all mysite.com/wp to mysite.com/new_wp
    – also find/replace all old_table_prefix to new_table_prefix
    – in the new config.php just change $table_prefix and add the define home+siteurl
    go and test mysite.com/new_wp

    good luck

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Make a copy of wordpress website on same server’ is closed to new replies.