Move site to a new domain

Find the instruction on how to move the site correctly to another domain

Sometimes our customers need to move the site to a new domain. Moving the WordPress site to a new host can be a bit stressful.

It should be done properly in order to avoid some annoying and unexpected errors.  Below, you may find the detailed instruction on moving the site.

  • Before you begin, deactivate all plugins. To deactivate all activated plugins, go to the admin page Plugins Installed Plugins . Mark all the plugins and then deactivate them in Bulk action Deactivate Apply.

  • Back up the WordPress Database and Files.
    • To backup your files manually: download your complete WordPress installation folder so that you won’t lose anything. Using any FTP/SFTP client like FileZilla, log in to your host by FTP/SFTP and download your htdocs or public_html folder (or anywhere your WordPress installation resides).

  • To back up your WordPress database manually: Log in to your phpMyAdmin, click on your WordPress database and select Export as shown in the image below.


Ensure that you’re exporting in SQL Format and click Go. Your WordPress database will then be downloaded as a .sql file. It is recommended to save the downloaded SQL file to a special folder on your computer so that you can easily locate it later. You can also use the command line to export a copy of your database, you can find more information on that here.

  • Create on your local machine clear database and make import from your exported file.
  • Then go to SQL tab and execute next command:UPDATE wp_options SET option_value = replace(option_value, ‘http://old_domain’, ‘http://new_domain’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;UPDATE wp_posts SET guid = replace(guid, ‘http://old_domain’,’http://new_domain’);UPDATE wp_posts SET post_content = replace(post_content, ‘http://old_domain’,
    ‘http://new_domain’);Note! Change ‘http://old_domain’ to your old address and change ‘http://new_domain’ to your new address.

  • Make Export of this local database.
  • Then transfer all your WordPress files to the new domain and change the name of database in wp-config.php.
  • Go to PHPMyAdmin and make import from database from p.3
  • Go to Settings Permalinks and just click Save.

 

That is all. Your site is successfully moved.

 

Regards, DFD Support Team

div#stuning-header .dfd-stuning-header-bg-container {background-image: url(https://nativewptheme.net/support/wp-content/uploads/2017/01/hands1.jpg);background-size: cover;background-position: center center;background-attachment: scroll;background-repeat: no-repeat;}#stuning-header div.page-title-inner {min-height: 550px;}#main-content .dfd-content-wrap {margin: 0px;} #main-content .dfd-content-wrap > article {padding: 0px;}@media only screen and (min-width: 1101px) {#layout.dfd-portfolio-loop > .row.full-width > .blog-section.no-sidebars,#layout.dfd-gallery-loop > .row.full-width > .blog-section.no-sidebars {padding: 0 0px;}#layout.dfd-portfolio-loop > .row.full-width > .blog-section.no-sidebars > #main-content > .dfd-content-wrap:first-child,#layout.dfd-gallery-loop > .row.full-width > .blog-section.no-sidebars > #main-content > .dfd-content-wrap:first-child {border-top: 0px solid transparent; border-bottom: 0px solid transparent;}#layout.dfd-portfolio-loop > .row.full-width #right-sidebar,#layout.dfd-gallery-loop > .row.full-width #right-sidebar {padding-top: 0px;padding-bottom: 0px;}#layout.dfd-portfolio-loop > .row.full-width > .blog-section.no-sidebars .sort-panel,#layout.dfd-gallery-loop > .row.full-width > .blog-section.no-sidebars .sort-panel {margin-left: -0px;margin-right: -0px;}}#layout .dfd-content-wrap.layout-side-image,#layout > .row.full-width .dfd-content-wrap.layout-side-image {margin-left: 0;margin-right: 0;}