Webdesign studio WebStudio2U Authorization Write a letter Sitemap

How to transfer a website to another host?

How to transfer a website to another host? Usually during the process of website development the site is hosted on a local computer. But when the site is ready you have to transfer it to the server of your hosting provider. How to transfer a website to a new host? It is not a problem! To transfer a website to another server you should perform several simple actions.

You may need to transfer a website to another host if you decided to develop a new site, carry out website redesign, or if you are not satisfied with the characteristics of the previous web hosting service. If your site is just a set of static HTML pages and graphic images, you should perform only two actions to transfer it: first you should copy all files from the old host, and then upload them on the new host.

If your site is based on a content management system (CMS), everything is somewhat different. Such sites (they are called dynamic sites as opposed to static ones) contain not a mere set of files, but also a database. Therefore to transfer a website which is based one of the CMSs you should copy both all the files and the site database.

Irrespective of the type of CMS used during website development you can transfer a website to another host in the following way.

First you should add the site domain to the new host. If the domain was specified during the registration of the host, the domain will be added automatically.

Then you should change the DNS settings. For that you have to enter the domain administration panel (when you register a domain name the registrar provides you with the login and password for the access) and replace old DNS setting with the new ones. The data about the DNS settings of the new host are sent to the site owner per e-mail during the registration of the host. It takes the DNS settings some time to update – from several hours to several days.

The next important stage of transferring a site to a new host is creating a database dump. A database dump is a file which contains information about the database configuration, values of the database tables fields. You can create a database dump using special utility programs – the so-called dumpers.

As a rule, the majority of modern hosts work with the MySQL DBMS (database management system). MySQL database management is performed with the help of a utility program – phpMyAdmin. You can use this utility program if you enter the administration panel of the “old” hosting. Depending on the kind of this panel the database management unit can be called “Database” or in a similar manner. In this unit you should find phpMyAdmin.

Then you should choose the database connected with the site which is being transferred. In the top menu of the utility program there is an option called Export which is responsible for the export of the database. Before starting the export of the database you should set the export parameters:

  • select all database tables;
  • add the directives “DROP TABLE/VIEW/PROCEDUR/FUNCTION”;
  • do not add the directive “IF NOT EXISTS” (uncheck the option);
  • add the directive “Save as file”;
  • pack the database into a .gzip archive (if you wish).

When the export of the database is complete, the archive with the database will be saved to the hard disk of your local computer.

But what should you do with this database to transfer a website to a new host? You should create a new database on the new host. You can do it with the help of a special utility program that can be accessed from the web host management panel. You should set the name for the new database and create a new database user. If the user already exists you should provide him with the access to the database by ticking off all privileges.

When the new database and user have been created, you can import the database dump which you have created to the new host. For that you have to repeat your previous actions: enter the phpMyAdmin management panel of the new hosting and choose the required operation – this time Import instead of Export. Than you should specify the path to the database dump file and perform the import of the database.

When the database is successfully imported you should copy all files of the site from the old hosting. The most convenient way to do it is to use any FTP client. Then you should copy the required files to the new host using the same FTP client.

To transfer a website to a new host you should make the final step and edit the configuration file. The name of this file is config.php (or a similar one). What should you change in this file? You should enter the database name, the username, and the name of the MySQL server (if necessary).

The above-described method allows you to transfer a website to the new host irrespective of the CMS the site is based on. Your site can be based on Joomla!, WordPress, or DLE – it doesn't matter! You can also use this method when you transfer a website from the local server (for example, XAMPP) to the host. However, in some cases the algorithm of the site transfer may differ from that described above.

TAGS
how to transfer a website, how to move a website, transfer a site to another host, move a website to another host