How to move a website to a new server

Sometimes I transfer websites to other server in order to increase the bandwith or have a better support. I am going to explain you the steps to do it without problems:

1) Look for a new server with enough time

I would recommend you search it at least one week in advance, especially if you are also going to transfer the domain, because this process can take a week. If you want to have more than one site in your server, it is important to check that it supports multi domain.

2) Look where the domains are managed

It is possible to have the hosting and the domains in the same contract, and in this case it is easier to manage them. However, it may be more expensive and it takes longer to transfer them. If they are separate you only have to change the DNS (an especial address type) in the administration panel so they redirect to the new address.

3) Download the files of the page

If the website has been created with a content manager like Joomla or WordPress, it is very simple to do this because there are many plugins that compress the necessary files like Akeeba or Online Backup. If you can’t use them you can download the files with an FTP tool like Filezilla that are very easy to use, you just need to fill its fields with the data that will give you the hosting provider.

4) Download the database

If you have used a plugin it is not necessary to do this because it will be included in the compressed file. If not , there may be an link in the admin panel of your current hosting with the text database or phpMyAdmin. After clicking on it, go to the export option . I recommend selecting the custom option and mark Gzip compression to avoid problems with special characters such as accented letters .

5) Download the emails

If you have emails accounts associated to your domain, it is important to download their contents before closing the contract or you will lose them. It is usually done with a program like Thunderbird.

6) Upload the files to the new server

The new provider will allow you to access to an administration panel in which you will see how to manage your files and the data required by the FTP tool. If you are going to upload one site you can copy its files to the public_html folder. If you have are more, create a folder for each and copy their files inside them. If the hosting allows you to upload compressed files , it is better to do so and uncompress them later because it is faster and prevents from corrupt uploads.

7) Configure the database

For this you have to create it and then add the data. You can do it in the administration panel in which you will be asked to set an username and password. Then upload the file that you exported before. This upload may not be necessary if you have used a plugin to export and import the files.

8) Set up the email accounts

Again in the admin panel, click on a link that will send you to a screen in which you will be asked for their addresses, the passwords and user data (name , …) . Once created, you can access them through a page provided by the hosting ( also known as WebMail ) or with a program like Outlook  on your computer or mobile phone.

Another option is to use your Gmail  accounts and connect them to your domain as if they were in your hosting. To do it, create the accounts in your server and  configure them so they forward a copy of everything that arrives, and activate in the Gmail settings the option to send emails as if it they were sent from the WebMail.

9) Test it all

Once everything is configured is time to test that everything works correctly. If it is a small site it can be done by hand in a few minutes, but if it is large consider checking it using Selenium tests with just one click.

10) Change the domain and try again

This is the last step.  If the domains are apart just change the DNS addresses to the new machine and in a couple of hours they will be redirected. If not , request a transfer and wait some days. After that try again the website and the new e-mail and forms,  and cancel the contract with the old provider.

Now you know how to transfer your site with just ten simple steps, I hope you do it succesfully!

Rafael Borrego

Software engineer specialised in working for startups and helping them grow.

Disclaimer: the posts are based on my own experience and may not reflect the views of my current or any previous employer

Facebook Twitter LinkedIn 

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>