Port Existing Website to WordPress
First of all, I would like to apologise to all my reader for any inconvenience caused during all the porting process. It wasn’t easy for me as I was doing something like this for the first time. I sure knew the basics theoretically but missing out on the practical knowledge. It took me about a week’s time to get it all up and running. And finally, when it’s finished, I could finally write my blogs again :). It requires a-lot to port your existing website to wordpress or some different platform.
In this article, I would like to share my practical knowledge which would help you in the future. Here’s the list of problems that you might face while porting your website to some other domain or to some other platform altogether, (just like in my case).
Port Existing Website to WordPress Requires –
- Preserving Google Page Rank
- Thorough Understanding of different types of redirects
- Logic Formulation
- Porting Database (if you are porting to another platform)
- Minimum Website Downtime
- Maintain a Good User Experience
The very first problem that was in front of me was the Google Ranking. You wouldn’t want to make Google sad, it may badly affect your website’s visibility. Hopefully, Google provides solutions for this problem. All you need to do is provide the new address for the moved pages to Google. This is really simple to do, all you need is to give a “301 redirect” to the new page address. If you are porting your existing website to some other domain, i.e, from www.example.com to www.differentexample.com then it becomes easier compared to the situation when you have to port your entire website to another platform or you may have to move your website to a new place inside your server. Both the situation have their pros and cons.
Porting to a different domain
The problems related to this situation are –
- Page Redirects
- Database Porting
You bought a new domain and hosted your new website there. Once your website is up and running, then you simply start redirecting your old website URLs to their new address without making any major changes to your website. You may have to come up with a redirection logic, which will solely depend on your project’s structure. Suppose, your old website blog URLs are shown in this format, www.oldwebsite.com/blog/123/port-website and your new website’s URLs format is www.newwebsite.com/port-website, then, in this case, you may use .htaccess file to redirect pages that match this particular pattern to their new home. You could simply write a redirect rule like the one below,
RewriteEngine on RedirectRule ^blog/[0-9]+/([a-zA-Z0-9-]+)/?$ HTTP://www.newwebsite.com/$1 [R=301,L]
if you want to read more about redirection rules, you may follow this link, URL Rewriting for the fearful.
So, that was easy, Right? Now, you are left with the database porting part.
Database porting is a tedious task, if you are porting the website to a similar platform like, from WordPress to WordPress then it may not cause you much trouble, but if you are porting to a whole different platform then you must look for some innovative ways to do that. You may search for some existing Softwares to make your job easy or you can walk the path I did. I’m running the old and new website together :D. I created a different database for my older website and simply imported the database there. I let my old website serve the way it was doing before and created a different database for WordPress. So, my website’s structure is pretty much the mixture of old and new.
One may ask about the performance factor for doing something like this, well, there’s not much difference in the performance because I haven’t tweaked with the core files. So basically, there are two different websites operating under the same domain. By-the-way you can take a look by yourself, here’s the link to my older website My Old Website, you may discuss more in the comments below.
Minimum Website Downtime
Another important thing to consider here is the downtime of your website. You may not want to make a bad impression for a new visitor. A returning visitor may know you and understand the downtime for a website but it will leave a bad impression on a new potential visitor. On top of this, it can also affect your Google Page Ranking. There are solutions to let google know that your website is under a temporary maintenance and that you can do with a “503 Status Code”. It simply states that the server is currently unable to handle the request due to a temporary overloading or maintenance of the server. You can also tell the crawlers about the retry time. You may use the below code snippet to return a 503 status code on your page.
header(‘HTTP/1.1 503 Service Temporarily Unavailable’);
header(‘Status: 503 Service Temporarily Unavailable’);
header(‘Retry-After: 300’);//300 seconds
By taking care of these simple steps, you can easily port your website to a new server or domain by keeping the integrity of your website intact. I learned these things by doing them practically and there will be lots of hidden traps that you might face, so my advice to you all is to plan ahead. This article was just an overview of all the problems that you might face, there are differents tastes to these problems as well. I will write another article about the problems I faced and what I did to solve them. I hope you had a great experience reading this article.
One Life, Rise and Shine