Learning Center » Tips and Help » Moving Your Website to Another Server

Moving Your Website to Another Server

  • Need to transfer your website to a different server? Need to set up a copy of your website on a localhost server?

    There are two main steps you'll take to accomplish this goal: backup your website on your current server, and reinstall on the new server.

    Quick side note before you start

    Don't cancel your current hosting plan yet! Make sure the transition to the new server is successful first. That way if anything goes wrong, you have a stable copy to restart from, and you can avoid downtime for your site. Please ensure that you stay within the license terms if keeping your original site online during your transition. You are allowed one live site and one closed development site. To keep both domains enabled, you would need another license or contact us for permission.

    Backing up your site

    Exporting your database and downloading your files

    You’ll start by logging in to your current server’s cpanel or FTP and creating a backup of your data. Later, you’ll upload those backups to the new server. To save time, use the cpanel for the backup and download your site’s data in a compressed form.

    Note: if your site is running while you’re transferring databases, you will only transfer the data up to when the backup was created. Information that was changed after the backup creation will be lost. To avoid this, put your site in “maintenance mode” before you transfer databases.

    Before backing up your current site, check settings for cache to ensure you are using a cache method supported by the new server. We recommend changing to “File Based” just for the move and then changing your settings once you’re all set on the new server.

    To create a backup of your data, follow the steps below:

    1. Select all of the files, then right click and select Compress.
    2. After you have your compressed folder, right click on it and select Download.
    3. Next you will export the database. Go into the “phpmyadmin” tool in the cpanel of your current host and select the database that you want to export.
    4. Click on the “Export” link toward the top. Select SQL for the format and click “Go”.

    Now your database file has been exported and stored in the .sql format, and you’re ready to import your data to your new server.

    Moving to the new server

    You should have received an email with your new server provider’s FTP and cpanel information. Log in to the cpanel of your new host to make sure it’s working.

    Upload your files backup

    Put the compressed zip file you made earlier, in the root folder of your new server. Then, on the new server, right click and extract the files. You might also need to set 777 Recursive permissions.

    Do I need to set 777 Recursive permissions?

    For Unix servers (or Unix variants, like Linux, OS X, FreeBSD, etc.), 777 Recursive permissions must be applied to the following directories:

    • /install/config
    • /temporary
    • /public
    • /application/themes
    • /application/packages
    • /application/languages
    • /application/settings/

    To do this log in over FTP, find the directory and click on the "Recursive into subdirectories" option.

    Import your database backup

    1. Log in to the cpanel of your new host and go to the Mysql database.
    2. Create a new database and user. Then add the user to the new database and grant “All Privileges”. Be sure to write down the database name, username, and password so you don’t forget it.
    3. Now, go to the phpmyadmin tool on your new server and choose the database you will be importing data into.
    4. Click on the “Import” link toward the top under “File to import”, browse for the .sql file you exported from your old server, and click on “Go.”

      An Important Note

      There is a server specific path which has to be set to ensure that your site runs correctly on your new server. We suggest that you contact your hosting company to make sure that this cache directory path is set correctly in this file: /application/settings/cache.php. You can find it under the variable “cache_dir”.

      Also, in the same file, you would change the “default_file_path” to match the cache directory path.

    5. You'll change the database info in the file: /application/settings/database.php to match the details for the database you created above.
    6. Clear your site cache by either renaming the /temporary/cache folder to /temporary/cachebu or by clearing it from your admin panel. If you rename the /cache folder, create a new one.

      If you are not sure about this you can ask your hosting company to help you with this.

    You’re all set! The new server has the information it needs to run your site properly.

    Point your domain to your new server

    Finally, you need to adjust your DNS settings with your domain host so that your domain points to the IP address of your new server. Every host has different steps to set this, so it is best to contact your domain name registrar or hosting company for more details on how to adjust your DNS settings. Please note that DNS propagation can take time. Your host can let you know an estimated time for propagation.

    Test your website

    Log in and test your website. That's all, you're done!

    If you find issues still, you should also try clearing your browser cache as old cookies could cause problems.