How to Install WordPress with TDWS Business Hosting5 April 2018
How To Modify your hosts file21 May 2018
There are various reason you may want to move your WordPress site from your current domain to your new domain. It could be your SEO or Rebranding your business or you have got access to a much stronger domain. If you are a WordPress User or have experience with WordPress you already know moving a WordPress site is a lot more than just copying your PHP files and your DB. This is why we have put this step-by-step guide to help you to move your WordPress from Domain A to Domain B.
Steps on your Current Domain
For the purpose of this tutorial we will be using cPanel. It is provided by most of the hosting companies. It is also a very easy Panel to use. TD Web Services, Business Hosting, Budget Hosting are providing you with cPanel.
Step 1: Backup your current WordPress Files
Login to your cPanel and click in Backup option that is provided.
There are two option, a full backup will backup your whole site. You will need access to WHM Restore function to restore it – this is useful if you have a VPS Server or a Dedicated Server with cPanel Installed. Most of the web hosting providers don’t allow this. Full Backup is useful when you need to take a complete backup for yourself.
Just click on Home Directory and the MySQL DB (which is being used by your WordPress) and download it to your local computer.
This is it! We are done with first phase of migration.
Step on your New/Target Domain
This step we will cover to setup your WordPress on new Domain/Hosting. Please note, that there is no need to install WordPress as we will be copying the files across.
Step 1: Upload the Files
If you are on TD Web Services Business Hosting, you need to goto your cPanel. When you are in cPanel, goto Backup module that is enabled for you.
All you need to do now is select the backup copy of your Home Directory and upload it. That’s it. Now you your home directory is ready with all your WordPress files and images restored. But, we are not yet done. We need to restore DB and also update the links.
Step 2: Restore the DB
There are multiple steps that are required here. Upload your DB via Restore DB.
Please note that your DB Name can be changed. It depends on Hosting providers and their setting. A new DB has been created by the system called “newdomain_olddomain_wp705”
Goto your MySQL DB Management. Click on “MySQL Databases” in your cPanel.Once you are in your MySQL Management section. You will need to create and add new users.
For the purpose of this demo I have created a new user “newdomain_wp7823“ with a strong password. In the next step we need to assign the user with privileges to access our imported DB. It is important to give all the privileges.
To assign Privileges to a user to access the DB on your MySQL Databases section of your cPanel, scroll to “Add User to Database”
Now select the user that we have just created and the DB where your WordPress DB has been imported and click on “Add”
Selected “All Privileges” and click on “Make Changes” Button. This completes your your MySQL Import and updates.
Step 3:Make Changes to wp-config File
What we need to do now is to update wp-config files to have the new DB Name, New User and New Password. Click on wp-config.php and Edit it via cPanel File Manager.
Update the DB Name, Username and Password and click on the save button. If you are just moving Hosting Providers, you can stop here and your WordPress has been migrated. Carry on the the final Step 4, ONLY if you are changing your domain name.
Step 4: Updating of URL(s) within your DB.
There are number of scripts that are available for exactly the same purpose. One of the best and most stable script that we use is Database Search & Replace in PHP by Interconnect/IT.
After downloading the script, upload it to your public_htm. I will recommend to create a random directory called “abcd” and upload it there and extract the files.
Once you have uploaded the file. Open a tab in your browser. Goto the URL where you have uploaded the Search and Replace Script. In our case it will be: http://newdomain.tdwebservices.net/abcd/Search-Replace-DB-master/
The script will read your wp-config and pick up your DB Name, DB User, DB Password. So you don’t have to enter it.
All you need to do is Enter your olddomain.com and newdomain – and click on Live Run.
Which will give you a list of changes it has made to your DB. The find and replace will only make changes to your DB. If there are “Hard” coded URL or reference to images, fonts etc. you will need to make manual changes to those URL(s).
That’s it. Your WordPress is now migrated to a new domain.
NOTE: After you have used Find and Replace script, please delete the folder!
The Easy Way Out
If you are a TD Web Services clients, just open a ticket with us and we will migrate you in for FREE. Not only that you can be rest assured that your Website will be much faster and better with features like HTTP/2, 1 GBPS Port Speed, Super Fast PHP 7.2 with FPM. The performance will be remarkable. Let TD Web Services Manage your WordPress for you. Get your Managed WordPress Hosting Today.