How to copy an existing (custom themed) site to a new domain

I’m trying to find a way of duplicating an existing WordPress site that uses a custom theme to a new domain.
Once it’s there I’ll do a redesign of the site and redirect the old url to the new one.

Just briefly… I tried following the instructions @ http://codex.wordpress.org/Moving_WordPress
but when it told me to
“3.Go back to your OLD blog and go to options and change the url (both of them) to that of your new site.” It logged me out and caused about 3 hours of trying to get it fixed again !!

Read More

So, my question is – how do I copy an existing, custom WP site & theme (including posts etc.) onto a new domain ?

I’m a complete noob at WordPress and would very much appreciate any help given… Thanks !

Related posts

Leave a Reply

3 comments

  1. If it’s a new domain, it’s pretty simple:

    1. Install WordPress on the NEW domain
    2. Copy wp-content/themes and wp-content/plugin from the OLD domain to the NEW domain (using FTP)
    3. Activate the Theme on the NEW domain
    4. Activate Plugins on the NEW domain
    5. Delete generic content (hello world post, about page, etc.) from the NEW domain
    6. Export all content from the OLD domain, via Dashboard -> Tools -> Export
    7. Import the just-exported file in the NEW domain, via Dashboard -> Tools -> Import. Important: be sure to check/enable the option to download/install attachments

    That should pretty much be it.

  2. One option is to download a plugin such as BackUpWordPress and create a full backup of your old site.

    Then FTP into your new host or same host but to the new domain and extract the downloaded files into there.

    There’s a database also included in your zip.

    That might be slightly confusing or possibly for more advanced users. But others may see this post and find it useful.

  3. You can also:

    1. Copy files from current production site to local dev site
    2. Create user in MySQL (phpMyAdmin)
    3. Export localhost.sql file from current production site (phpMyAdmin)
    4. Import localhost.sql file to local dev site (phpMyAdmin)
    5. Paste this code into the second line of your loaded theme‘s functions.php

    NOTE: For more information, see: https://www.sitepoint.com/how-to-migrate-a-wordpress-site-to-a-new-domain-and-hosting/

    php
    <?php
    // If your local copy is served from /www/site/
    update_option ( 'siteurl', 'http://localdev.net/site' );
    update_option ( 'home', 'http://localdev.net/site' );

    1. Load site in your Web Browser
    2. Done

    FINAL STEP: COmment out those two lines from the functions.php

    I find this is much faster and less mentally taxing than the accepted answer. It’s like two steps after you zip your existing site. Paste it into your desired folder, export import the DB, then add that line to functions.php, boom done.