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 !!

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 !

3 Answers 3


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.

  • Hi Chip, thanks for the reply. I've done as you suggested, but when I Activate the Theme on the new domain, I seem to loose all CSS styles.
    – wotney
    Commented Jan 29, 2013 at 15:38
  • How are those CSS styles implemented? Custom Theme Options? Custom CSS Plugin? Something else? Commented Jan 29, 2013 at 15:54
  • Sorry about the delay Chip, I tried to get ahead of myself and needed to re-install the WP site again.
    – wotney
    Commented Jan 29, 2013 at 16:54
  • I'm not sure how the CSS is referenced. SNM is the name of our custom theme... On the original site I can see the css file here: site.com/wp-content/themes/snm/style.css The interesting thing is, once I've applied the snm theme - we lose all the styling. Whenever I try and browse to another part of the site,it logs me out and I then get a 404 error. Looking at the URL - it is trying to find the page on my old site. eg: I click on "posts" it takes me to oldsite.com/wp-login.php?redirect_to=newsite.com
    – wotney
    Commented Jan 29, 2013 at 17:32
  • Does your Theme have any hard-coded URLs in it, for any reason? Commented Jan 29, 2013 at 17:51

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.


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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.