Being a website development company, we deal with developing websites, re-designing old websites and migrating an existing website from one hosting server to another.
Not only for WordPress website development projects but we also frequently get calls only for migrating WordPress websites. This is because of WordPress being most popular among non to semi tech-savvy bloggers and professionals. Here we will share with you the process of moving the WordPress website from one hosting server to another. Let’s see what we need before initiating migration.
Tools Required: No Special Tool Required (Optional tool: FTP Software Like Filezilla)
Time: Approximately 30 mins
Precautions: Backup Complete Files and Database before doing anything else
Skill Required: You should be comfortable using the Hosting/Domain Control Panel and FTP Software.
Possible Error/Issues: We will discuss this topic at the end of this post.
Let’s Go
To move a WordPress website, we need to move two things. First, the files which include your media files, theme, plugins and other WordPress files. The second and most critical thing is the database. WordPress uses the MySQL database and the reference for the same you can find in the config.php file.
Step 1
The first thing we will do is download WordPress files. Login to your hosting panel and navigate to files. If you are using Cpanel, then you will find those files in “public_html” directory. If you are using any other Panel like Plesk, then you might find your files located in “htdocs” most probably. You can select all files at once and compress them and then download for faster processing otherwise you can download them in que using FTP software like Filezilla, which we use for most of our files transfer processes.
Step 2
Secondly, we will download the MySQL database. You are already in the hosting panel, search for database option. Navigate to “phpMyAdmin”, click on the database name in the left side and then click on the “Export” link in the top menu to download the database in SQL format. Now you have both files and Database downloaded which needs to be uploaded at a new hosting server now.
Step 3
Now login to the new hosting panel and navigate to files. Upload files in the file section and extract, if uploaded the compressed file. For the database, you need to create a blank database and database user first. Keep database user’s password in notepad, which we will use for configuration in step 4. Once created the database user, grant it rights over the newly created database. Now navigate to “phpMyAdmin”, select the database and upload the database into it.
Step 4
Now you have everything moved to the new server. Download the WordPress “config.php” from the directory where you uploaded files. Open the file in any text editor and replace username, database name and password and upload the same again replacing the old one.
Step 5
Now you have uploaded everything and configured the conifig.php file. The last step is to map name servers in the domain panel to a new server. Wait for few hours for DNS to propagate and your website should be accessible using new hosting server.
Possible Error/Issues
The process of migrating WordPress is not as easy it looks. If caught with a technical glitch, it could be frustrating and time taking process. Below are the possible issues we are sharing as per our experience.
Database Uploaded Partially
This is a frequently faced issue while moving the WordPress website. Different hosting servers have a different timeout for uploading files and if your database file is not uploaded within the time, it may leave some data behind. The same could happen when you download the database from the previous hosting. This is the major issue, we come across while migrating the WordPress website. To solve this issue, you should contact the hosting provider and they can help you in uploading/downloading the database.
Mismatch in Character Encoding
Character Encoding is the data encoding type, a database uses. Different servers may have a different default settings for database encoding. The error looks like “#1273 -Unknown collation: ‘utfxxxx_xxx_xx’”.
To overcome this issue, you can open SQL file in text editor and replace data encoding type. Unfortunately, if you are not a technical person, this could be difficult for you.
404 Error in Internal Pages
This is second most faced issue we encounter. Technical speaking, this happens because of mismatch in .htaccess file coding which is responsible for URL writing.
To resolve this issue, you can simply log in to your wp-admin, navigate to “Dashboard -> Settings -> Permalinks” and save even without making any changes.
Error Establishing a Database Connection
This simply means your MySQL database is not accessible to the website. You need to check:
- If Database name, user name and password are correctly updated in “config.php” file
- User is granted with required permission on the database
- Using the Repair Database option in control panel may also help
SSL Certificate issues
If you had SSL enabled with your previous hosting servers then you must have SSL enabled in current hosting. Otherwise the website which is set with https path will give SSL error. If you had no SSL with the previous hosting and have with current hosting or vice versa, you should log in to phpMyAdmin, open the WordPress “options” table and change the http/https prefix accordingly for “siteurl” and “home” in “option_value” field.
We Can Help
If you are still facing any issue or simply need help in moving you hosting, you can contact us. We can also get you good hosting plans.