Our Tutorials

Check these easy to understand tutorials, written by our Tech Support Team

How to move Joomla 2.5 from localhost to server

Read 0 Comments

Moving a Joomla website from localhost to server is basically the same as moving it from one hosting server to another. You only need to upload the website files to the hosting server, import the database and adjust Joomla configuration to match new server settings and domain name.

Follow these steps to move Joomla from localhost to server

Start by uploading all files to the new server. You can use any FTP client to do this. Before uploading the files, you will need to connect to the FTP server by using the login details provided by the hosting service provider. Be sure to set up the domain name in the hosting server control panel as the files need to be uploaded directly to this domain public_html directory.

Once all the files are uploaded, you’ll need to create a database in server control panel. This can be done in the MySQL management area. Connect to the MySQL server by using MySQL client, such as phpMyAdmin. It can be accessed by adding “phpmyadmin” at the end of the domain name like “www.domain.com/phpmyadmin”. Once logged in, select the newly created database and go to the “Import” tab to start importing the database tables.

WordPress Import Database

Select the database file from the local drive by clicking the “Browse…” button. Note that the database file format should be .gzip, .zip, .sql.zip or .sql.

After the database is successfully uploaded, you should see it’s tables by clicking on the database name.

Joomla database tables

The last thing you need to do is to adjust the Joomla configuration file in order to match the database, website URL, log and tmp directory paths. Navigate to the directory where Joomla is currently uploaded and find the file “configuration.php”. Open it and locate the following lines for database settings:

1
2
3
4
5
6
public $dbtype = 'mysql';
public $host = 'localhost';
public $user = 'database_user';
public $password = 'password';
public $db = 'database_name';
public $dbprefix = 'jos_';

Edit the values between ‘ ‘ by replacing them with correct details of the database name, username and password of the new server. Database host can remain “localhost” as we will be using the local MySQL server which is running in the same server as our website.

You will also need to change the line in which the website URL is defined. If you have used the same domain name in the local server, there is no need to change it when website is hosted in the hosting server. However, if you will be using a different domain, find and change it in the following line:

public $live_site = ‘domain.com';

Finally, edit the path for logs and tmp directory. They can be adjusted by editing these lines:

1
2
public $log_path = '/home/username/domains/domain.com/public_html/joomla/logs';
public $tmp_path = '/home/username/domains/domain.com/public_html/joomla/tmp';

The path structures in the local and hosting server might be different. Therefore, you might need to adjust them accordingly.

If everything was set correctly and there aren’t any errors in the website, you have transferred the website to a new server successfully.

Rate this Tutorial:
No CommentsLeave a Comment

Current ye@r *

Ask an expert
Don't hesitate and ask for advise from our helpful team. Call-Free +1.888-804-2926 or
© 2014 All Rights Reserved. HOST1PLUS a division of Digital Energy Technologies Limited, 26 York Street, London W1U 6PZ, United Kingdom
Need Help? Ask Our Support Team!