Website Help
Transfer Site
How to migrate my local Joomla! 3.x installation to the Joomla! 3.x installation on my hosting plan?

How to migrate my local Joomla! 3.x installation to the Joomla! 3.x installation on my hosting plan?

First, you should know that your Joomla! 3.x application (portal) consists of two components: Joomla! 3.x files and Joomla! 3.x database.

  • The files and folders of your Joomla! 3.x application contain the scripts and core application code.
  • The Joomla! 3.x database contains all records for your website such as your site sections, categories, articles, etc.

Let’s assume that you are running your own *LAMP or *WAMP web server or you have a web hosting account with another company. You should know the root directory where your Joomla! 3.x installation resides. It is often called httpdocs, public_html or www. Those are the so-called web server root directories. So let’s suppose that your Joomla! 3.x application is installed under your web server root directory.

The first thing you have to do when you want to transfer your Joomla! 3.x applications to your SiteGround server is to copy the entire content of your web server root directory straight into the public_html folder of your SiteGround web hosting account. Note that if you would like the site to be available via a subdirectory/subdomain for your primary domain name it should be uploaded to the corresponding directory under public_html.

If you are running your own server probably you have already had your Joomla! 3.x site files on your hard drive. In case you are hosting your account on a remote machine, download your Joomla! 3.x site files and directories (bear in mind that you should keep the directory structure intact) on your desktop PC by using your favorite FTP client. (You can find here how to backup your Joomla! 3.x site.)

Once the download is finished, connect to your SiteGround FTP account, change your current working directory to the public_html one (this is the root/main folder for your website) and drag and drop your Joomla! 3.x files and folders from your desktop PC to your public_html folder.

The next step is to create a full dump of your Joomla! 3.x MySQL database. If you are running your own *WAMP or *LAMP server probably you already have the phpMyAdmin tool installed. If you are using a different web hosting provider, they should provide you with access to a database management tool. Here we assume that you are managing your databases with phpMyAdmin as it is the most popular tool for administrating MySQL databases.

Once you are logged in to your phpMyadmin tool, backing up (exporting) your database is simple. First, choose your database from the left menu. Then click the Export tab. Select all the tables, check Add DROP TABLE and Save as file. Leave all other options untouched. Finally, click on Go and the database dump will be downloaded to your PC. (You can find here how to export your database.)

The next step we should take is to import your database dump to your SiteGround account.

To do that you should go to your Site Tools area and create a brand new database. Mind that you can create databases only from your Site Tools. You cannot execute CREATE database; MySQL statement from the phpMyadmin tool. Once you’ve created your new database, create a new database username and add it to the database you have created during the previous step.

We assume that you have created your MySQL database and the next step is to go into your SiteGround phpMyAdmin interface.

To restore (import) a database in phpMyAdmin, first choose the database you’ll be restoring from the left menu. Then click the Import tab. You have the option of importing a .sql file. Use the “Browse” button to find it on your computer and then click on Go at the bottom.

If you receive an error message which says access denied, you should open the database dump file you have downloaded on your desktop PC with your favorite text editor and look for lines that may contain CREATE database db_name; and/or USE db_name; mysql statements. If you find any, delete them and try to re-import the dump. If you run into trouble our friendly technical support team is available 24/7 and ready to help you.

The final step is to adjust the core settings which are defined in your main Joomla! 3.x configuration.php file. Go to your SiteGround File Manager, change the current working directory to public_html and if you have followed the steps mentioned above correctly you should be able to locate configuration.php file in there. Open it for editing.

Below are the main variables you need to adjust so they can fit your new SiteGround hosting environment:

public $host = 'some.host.com';
public $user = 'some_db_user';
public $password = 'some_db_password';
public $db = 'some_db_user';
public $live_site = 'http://url.to.your.joomla.site.com';
public $log_path = '/path/to/your/joomla/root/folder/log';
public $tmp_path = '/path/to/your/joomla/root/folder/tmp';

Examples provided above are the core Joomla! 3.x configuration variables you have used with your desktop/home LAMP/WAMP server or with your previous host.

To make your Joomla! 3.x site run on your SiteGround account you should adjust them as follows:

public $host = 'localhost';
public $user = 'mysqluser';
public $password ='the_password_you_have_defined_during_the_mysql_username_creation';
public $db = 'mysqldb';
public $live_site = 'http://your-siteground-domain.com';
public $log_path = '/home/customer/www/yourdomain.com/public_html/log';
public $tmp_path = '/home/customer/www/yourdomain.com/public_html/tmp';

You should replace mysqluser with the MySQL username you have created during the database setup process mentioned above. This also applies for the password for this username and for the database name.

public $live_site is also essential and you should put the domain name you are using with your SiteGround hosting account there.

If you have correctly followed the instructions mentioned above and your domain name properly points to the DNS servers of your SiteGround hosting account, you should be able to see your Joomla! 3.x portal.

For more information on how to manage your Joomla! 3.x, you can visit our Joomla! 3.x tutorial.

If you have problems migrating your Joomla! 3.x yourself, ask your host for assistance.

Share This Article