• Skip to primary navigation
  • Skip to main content
  • Skip to footer

Ironclad Tech Services

  • Home
  • Services
  • Resources
    • Tech Articles
    • Security Info
    • Product Reviews
      • Review Request
  • Projects
    • Testimonials
  • About Us
  • Contact Us
  • Computer Services
    • Endpoint Security
    • Password Security
    • Lenovo Solutions
  • Networking
    • Cisco Meraki
  • Security
  • Smart Home
  • Cellular Amplifiers
  • Website Services
  • Cut the Cord TV
You are here: Home / How-To / HOW-TO Transfer an Existing Wordpress Site to a New Domain

July 20, 2012 By Sean 19 Comments

HOW-TO Transfer an Existing WordPress Site to a New Domain

The steps in this WordPress website transfer are based on using a shared hosting plan with Cpanel, PHPmyadmin, and FTP capabilities.  If you are using some other type of web hosting setup, this process may not work or will need to be modified to make the transfer process work.

Note:  For the purpose of this article, the term “existing domain” refers to the original WordPress website, and “new domain” refers to the site the original one is being moved to.

This transfer process will allow you to move or copy a WordPress website from its current domain (url) to a new domain (url).  Ironclad Tech Services originally completed this process to duplicate a WordPress website from a coach’s site to one of his client’s sites.  After the transfer, the client  manually changed some of the content and other needed items, but overall, as far as the look and feel, the sites would stay the same.  This process reduces the time necessary for the new domain site to go live.  It basically allows the site to be duplicated without any design work.

Please use the videos that are embedded in this article to follow along.  I have outlined the steps in the article, but the details of each step are noted in the videos.  Here are the main steps in this transfer process:

STEP 1 – Set up the new domain’s WordPress website.

Go to the new domain’s WordPress Admin Panel and install the theme used on the existing domain as well as all plug-ins that are on the existing domain.  The theme and plug-ins should be the same as the existing domain’s site.

On the new domain, activate the theme and the plug-ins which are activated on the existing domain.

Log into the existing domain’s WordPress Admin Panel.  Update all plug-ins on the existing domain so they match the versions that are on the new domain.

STEP 2 – Export the existing domain’s database.

Log into the Cpanel for the existing domain.  Go to PHPMyAdmin and select the WordPress database that you want to export.  Click the export tab which is across the top of the database tables.  Once you have clicked on the export tab, select the custom “Display all possible options”.  Make sure all the tables are highlighted and selected.  Under the “Object Creation Options,” check the box that states “Add Drop Table”.  Go to the bottom of the page/screen and click the “Go” icon.  This will export the existing domain’s WordPress table to your computer.  Remember the location of this file.

STEP 3 – Upload needed files to the new domain website.

First, back up the WordPress install on the new domain.  Follow the same steps to export the WordPress database in the above step.  This is just a little insurance so you don’t have to reinstall WordPress if something goes wrong on the new domain.

Download the search and replace script.  This will download as a zip file so unzip/extract the file before uploading it to your new domain.

Connect to the existing domain via FTP and download the htaccess file from the existing domain.  Connect to the new domain via FTP and upload the “searchreplacedb2.php” file to the root directory which is usually the public_html or www. directory.  At the same time, also upload the existing domains htaccess file to the new domain.

Now, check the new domain and make sure that under wp-contents/uploads there are the same folders that are on the existing domain.  If not, you need to create the folders on the new domain.  You should only worry that the year and the months are the same.  File permissions must also be the same on the new domain as they are on the existing domain.

STEP 4 – Import the WordPress database to the new domain.

Go back to PhpMyAdmin for the new domain, select the WordPress database again, and click the “Import” tab.  Use the browse function and find the database that you exported from the existing domain.  Then, click the “Go” icon to import the existing domain’s database.  This will take a few minutes depending on the size of the database being imported.

STEP 5 – Run the “search and replace” script on the new domain.

Type the url for the new domain, add “searchreplacedb2” to the end of the URL, and hit enter.  Make sure there is a forward slash between the url and the searchreplacedb2.  This will start the “search and replace” script which will walk you through the process of replacing all existing domain names in the database with new domain names.

When the first screen of the script comes up, click Submit.  On the next screen all information should be populated and click Submit DB details.  For the next screen make sure all tables are highlighted.  Do not check the box “Leave GUID column unchanged?”  Click continue.

Make sure you put the site URL for the existing domain on the top line and the URL for the new domain on the second line.  Do not put the HTTP:// in front of the domains.  Make sure this information is correct before continuing.

STEP 6 – Make final changes and test new domain.

Go to the PhPMyAdmin for the new domain and click on the WordPress database; then, click on the wp_users table.  Click edit and change the user_login to your new domain’s user name and change the user_pass encrypted password to your new domain’s password.  Do this by highlighting the encrypted password and then typing the new password.  Make sure the drop down menu beside the password is changed to MD5 before saving changes using the GO icon on the bottom of the screen.

Next, connect to the existing domain via FTP and go to public_html/wp-contents/uploads directory.  There should be a year directory and, in this directory, other folders with months numbered as 01, 03, 04, etc.  The numbers and the amount of them will depend on when WordPress was installed on the existing domain.  Download these number (month folders) directories.

Now, connect to the new domain using ftp and go to the same directory public_html/wp-contents/uploads.  You should also have the same directories under the 2012 folder since you created these in step 3.  Upload the content of these directories (not the directories themselves) which should be media such as pictures, etc., into the corresponding folder on the new domain.  For example, highlight all the pictures in the 01 directory and upload them to the 01 directory on the new domain.  Do this for the rest of the directories/folders.  This needs to be done because the pictures and other media content do not get transferred to the new domain when you transfer the database.  Only the links to these media files are transferred during the database transfer.

Go to your new domain’s wp-admin and log into the site.  Try and upload a photo using the media tab.  If it gives you an error regarding wp-content/upload directory, go to the settings tab for media and type in “wp-content/uploads” and click “save changes”  Test the upload media again and see if it works.  Also, test uploading and installing other plug-ins and themes to make sure everything is working correctly.  If not, you will need to do some troubleshooting.  Lastly, go to the new domain and see if everything looks correct and functions correctly.  You should be done if everything looks good.

Leave a comment with any insight you have that may help others.  This is not the only way to transfer sites, but I found it to be effective.  If you need assistance with anything WordPress-related, please contact us at Ironclad Tech Services.

Filed Under: How-To Tagged With: Blog, Blogging, Wordpress, Wordpress Install, Wordpress Themes, Wordpress Widget

Need Assistance!!

Not sure what to do next or how to proceed?  Contact us, we can assist you with your IT, Computer, Networking, Website, Communication, Audio/Video, Smart Home/Business and all your Security needs.  We service both Residential and Business customers.

About Sean

Sean McCreary, CPP, ARM is both a security and IT (Information Technology) professional. He has over 30 years experience in the security field as well as 15 years experience in the information technology field. Sean is a CPP (Certified Protection Professional) along with holding a variety of other vendor certifications. Beyond his experience he also has degrees in Loss Prevention and Safety, Information System Security, Security and Loss Prevention and Police Science. Sean and his wife Beth started Ironclad Tech Services in 2011. They have lived in Lawrenceburg, KY for the past 20 years along with their four kids.

Reader Interactions

Comments

  1. Dave says

    March 21, 2013 at 6:15 pm

    Hey I’m just curious if this still requires some kind of a 301 redirect from the old sites? I’m not great at how to do that, but thought I’d ask.

    Reply
    • Sean says

      March 21, 2013 at 10:39 pm

      No I have never used a 301 redirect. I use this to either move a site to a new host or to as in this case of the tutorial to duplicate a site to a new domain. The way of moving the site can also be used to restore a site from backup with a little modification etc. As far as the redirect yes there may be times it is needed but for the purposes I have used it for, none at this time. Redirects can be written and put in your htaccess file as one method. Depending on your host you maybe have a more friendly way through the control panel of the server etc. Glas it was helpful let me know if you have any other questions.

      Reply
  2. Dave says

    March 21, 2013 at 6:15 pm

    Oh and BTW thanks–this is one of the few good tutorials for wp moving that actually was very clear–and worked!

    Reply
  3. Eva says

    May 28, 2013 at 2:54 pm

    Sean, I used your tutorial for moving my existing domain (actually a subdomain) to a new domain. I spent couple of hours doing that without any luck :-(, nothing happened. I think I know what the problem is – in the new domain – phpmyadmin there some strange prefix instead of wp_ there is oew_ obviously the old database didn’t copy over the new one. My question is how do I get rid off or change the oew_ to wp_ ? Or do I need to delete everything and start over?

    Reply
  4. Dylan says

    May 31, 2013 at 1:33 pm

    if I have already moved the existing website to the new domain,can I delete the existing one since I am not using it anymore?

    Reply
    • Sean says

      June 4, 2013 at 7:06 am

      Dylan, sure you can, just make sure the new domain is working as you want and all things are good before doing that. Also, once the DNS has been changed to the new domain, the old one really serves no purpose.

      Reply
  5. Eva says

    June 3, 2013 at 4:40 pm

    I found Sean’s tutorial on Google and actually this is the only straight forward step by step useful and time saving process regarding the transfer of a WP website under a new domain. Sean was very prompt to answer my questions and was extremely helpful to save a website I put together without breakage or losing any data.

    Reply
  6. dave says

    August 15, 2013 at 1:59 am

    ack! I’ve followed this before and it worked wonders. But I tried this time and now I log in and get a blank page on the new domain (I get the wp login fine but when it logs in it’s totally blank)?

    Reply
  7. dave says

    August 15, 2013 at 2:03 am

    Just to clarify on the above–the database is intact (all the wp posts are there in phpadmin). Just nothing after login….

    Reply
    • Sean says

      August 19, 2013 at 9:04 am

      Could you share the link to the site so could take a look. Did you also transfer the htaccess file from the existing domain to the new domain? The htaccess file on a couple gave me issues with blank pages, just a thought.

      Reply
  8. David says

    August 18, 2013 at 7:09 am

    Done absolutely everything in your tutorial, my original site here:
    http://webservicesagent.com/
    and my new one:
    http://www.webserviceagent.com/

    Images aren’t showing, text not showing, pages not showing, so far nothing is showing. Pretty disappointing after all that, any ideas why?

    Reply
    • David says

      August 18, 2013 at 7:41 am

      Never mind, worked it out, thanks..

      Reply
      • Sean says

        August 19, 2013 at 9:02 am

        Could you share what the porblem(s) were?

        Reply
  9. steve says

    November 4, 2013 at 11:50 am

    Hi Sir,

    Does this tutorial work with wordpress? cause I’m trying to copy the existing website which is live right now to a new subdomain in a different server, cause what i want to happen is to edit its interface in other url so that the changes can’t be seen by the visitors. Can you help me with this? Thank you in advance.

    Thanks,

    Reply
    • Sean says

      November 6, 2013 at 9:33 am

      Steve,

      This method is for WordPress websites. I have done it with WordPress websites that I have designed using the Genesis framework and also for others that are using a variety of themes. The process has always been the same for me. Once transferred and the url changed (as described in the process) you can cahnge the design, content etc. Not sure what you are meaning as far as changes cant be seen by the visitors, could you explain further on that portion of it? Also, if you send link to site or give me a direct email contact for you I can probably help you more directly.

      Reply
  10. JD says

    July 31, 2014 at 12:06 am

    Hi Sean

    I have both new and old domains on the same shared hosting ie. they are in their own folders. There are other domain folders as well. So do I put the “search and replace script” in the public_html directory or inside the folder of the new domain?

    thks

    Reply
    • Sean says

      July 31, 2014 at 10:50 am

      Shared hosting should not matter. The search and replace script should be in the root directory so in your case it appears (without looking at the site) it would be the root or main folder for the particular website you ware wanting to change. This should be the folder of the domain you are wanting to change. Let me know if that works out. Make sure you backup your sites before doing this just in case there is an issue or it is in the wrong folder. Sean

      Reply
  11. JD says

    August 6, 2014 at 11:16 pm

    Yes it worked fine after some trial and error. Thanks so much.

    Reply
    • Sean says

      August 7, 2014 at 5:35 pm

      JD,

      Glad it worked for you. It works for most wordpress sites but sometimes has to be slightly modified depending on the server and hosting configuration.

      Sean

      Reply

Leave a Reply to dave Cancel reply

Your email address will not be published. Required fields are marked *

Footer

Company Profile

Ironclad Tech Services has been serving Central Kentucky customers since 2011.  Our company is located in Lawrenceburg, Kentucky and provides a variety of IT and Security services for churches, non-profits, small businesses, and residential customers.  Since opening for … Read More about About Us

Recent Articles

  • Microsoft Scams
  • Video Analytics – Do I Need It?
  • Alarm.com What Is It?
  • Why Hire a Managed Service Provider?
  • What is Included in Managed Services?
  • Ironclad Tech Services – New Services April 2019
  • Channel Master CM3090 J-Mount Review

Search

Follow Us

  • LinkedIn
  • RSS
  • YouTube

© Copyright 2018 Ironclad Tech Services · All Rights Reserved · Privacy Policy · Terms of Use · Site-Map · Website Design By Ironclad Tech Services