Transfer WordPress site on New domain or host

WordPress:

As per wiki WordPress is a free and open-source content management system written in PHP and paired with a MySQL or MariaDB database. Features include a plugin architecture and a template system, referred to within WordPress as Themes.

In simple term, a Web development platform, which helps individuals to create their own web site without having little or no knowledge of programming languages.

When it comes to move your existing WordPress site without loosing your existing work, the very first question comes from where a person should start with. Let’s follow simple steps to get it done.

Consider followings:

your current WordPress domain is “www.myCurrentWordPress.com” and you would like to move it to “www.myNewWordPress.com

Steps to be followed:

  • You should have access to both the cPanels (Where current WordPress Site is hosted) as well as New (Where you would like to move your current WordPress site)
  • Database Backup from your current WordPress
  • Database creation for your new WordPress at new Host
  • Importing database which you have backed-up
  • Update Urls
  • Backup and download original WordPress site
  • Upload and Extract backed-up original WordPress on the new Host
  • Make changes to wp-config file to set new database details
  • Navigate to New WordPress wp-admin
  • Install Better Search and Replace plugin
  • Replace old urls with new urls

Followings are the commands needs to be executed to update or replace old WordPress posts’ urls in the database:

UPDATE wp_options SET option_value = replace(option_value, 'http://yourOldSiteUrl.com', 'https://yourNewSiteUrl.com') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'http://yourOldSiteUrl.com','https://yourNewSiteUrl.com');

UPDATE wp_posts SET post_content = replace(post_content, 'http://yourOldSiteUrl.com', 'https://yourNewSiteUrl.com');

UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://yourOldSiteUrl.com','https://yourNewSiteUrl.com');

Don’t forget to replace “yourOldSiteUrl.com” and “yourNewSiteUrl.com” to yours That’s all you are done

Leave a Reply

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