WordPress is a reliable open-source CMS platform that is best known for its flexibility. This ductile behavior makes it easy to switch a WordPress powered website to a new server without killing your precious time into its reinstallation process. It is a bit hectic process that involves utter care and precision, else you might undergo unexpected errors.
Even a layman has a basic logic that we should keep a complete data back up to get rid of any uncertainties that may occur if the migration process will not go well. In that case, you need to redo all the actions.
But, it is not as easy as copying the data from the old domain and pasting it into the new one. It is bit tricky than this.
Let’s see how.
Before getting started
If you are planning to move your WordPress site, there must be some future plans in your mind. Most probably, you are going to make a new start or want a fresh idea for your business. But, the things are not as smooth as they seem to be. Moving to a new domain will temporarily affect your search engine rankings. This is because search engines take time to adjust to the changes.
Keep calm. There is no need to panic as every problem of the universe comes with a solution. Likewise, it is also possible to decrease the negative effect of the migration process in terms of SEO ranking as well as organic traffic.
For this, proper 301 redirects are followed to keep the old traffic and SEO juice along with notifying the search engines.
One can use the above code in the .htaccess file to implement the efficient redirects on your existing website.
When you are moving the domains without changing the URL of your WordPress website, you only need to move the relevant files. If the URL and database are same, you can simply copy the file and database. But, the things might get worse if you need to modify the name of users or database. Here, you can locate and edit wp-config php file to get the appropriate values.
As you made initial prerequisites, it is the time to move for further steps.
Let’s get started:
Do rewrites, if any
Checking for any rewrites is an important aspect that one must consider before actual site migration. In actual form, they are the kind of permalinks. If you will find any scope of rewrite on the website, you must put a check that all the permalinks (or, .htaccess files) are disabled. All of them must be reconfigured before the WordPress website goes live again.
Change domain names and URLs
If you want to shift your WordPress packed website by changing both the domain name and URLs, you need to follow a stepwise process to move further.
You are suggested to first download all the existing site files and do an export for the existing database. This can be done by accessing the MySQL section.
The next step is to move the back up files plus WordPress database that is being exported to a new folder at a safe place.
Thereafter, one can log in to the WordPress site and go to the settings section. Here, you will find an option to change the URLs manually. Remember to save the settings once you have made the relevant changes.
After doing this, it is the time to download the database and site files once again. Once it is finished, it is advisable to edit the PHP file wp-config again. Here, one must put the username, password and MySQL database name of the new server before uploading the files.
Import database to a new server
When done with the above-stated processes, you can now import the database onto a new server of your choice. A noticeable fact here is, you need to keep the old domain name and location references in your WordPress database while making the required changes. It plays a big role in displaying the links and themes.
There are chances for data serialization issues if you will search and replace the entire database. Its probable cause is, few widgets and themes of WordPress are basically made to save values as per the URL marked length. It might alter when changes are made.
In such scenario, use below approaches:
- Use different plugins after granting access in WP admin dashboard.
- Do WP-CLI search replace in case installation is performed by a hosting provider.
- Try to search and replace in WordPress database script when database admin is made accessible for third-party usage.
Lastly, migrate your WordPress site
Finally, you are liable to shift your WordPress site to a new domain server. For this, one can use 2 options. Either move your core files to the new directory or to a root directory.
If you are picking a new directory, you can easily create a new one. But, if you need to move to the root directory, make sure that you have taken the back up of all the files including index and .htaccess.
You can now log in to the website to jump to the settings section. Scroll your cursor to the address of the WordPress website and change the location to keep the main core files. Save the changes.
Then, move all your core files to the desired new location keeping the entire data of original as well as sub-directories. You can now test it while ensuring that the brackets are removed.
You can also manually update the permalink structure that comes from the htaccess file. Give a check that all the images and images are modified to the new location for search and replace option as well.
As the concluding step, you can restart your domain server to avoid any error that might occur.
Wrapping It Up
Each activity that you perform for your brand website is crucial as it can either make or break your web presence. Even if you have the best resources in hand, it is essential to be attentive at every step of the process. There are several steps that are intermingled together to get the desired results. A mere mistake can ruin your journey, hence it’s better to ask instead of guessing.
We have made our genuine efforts in making this post informative by putting every ingredient that it takes to shift the WordPress website to a fresh domain. Our intent is to make your business nurtured with a revamped website.
2 Comments
Fanta
IF we miss any of step, then we will fully destroy our work.
Taylor Macallan
Thanks a lot for your comment, follow all the steps and everything will be great 🙂