How to move Joomla 2.5 from localhost to serverRead 0 Comments
To move Joomla website from localhost to the server is basically the same as moving it from one hosting server to another. It only requires uploading website files to the hosting server, import database and adjust Joomla configuration to match new server settings and domain name.
Start by uploading all files to the new server. For this reason it’s possible to use FTP and FileZilla for uploading the files. Before uploading files, we will need to connect to FTP server by using login details provided by hosting service provider. Be sure to set up domain name in the hosting server control panel as the files needs to be uploaded directly to this domain public_html directory.
Once all the files will be uploaded, it’s time to create a database in server control panel. Usually this can be done in MySQL management area by simply creating new database and username with specified password. Then connect to MySQL server by using MySQL client like phpMyAdmin. Basically it can be reached by adding “phpmyadmin” at the end of domain name like “www.domain.com/phpmyadmin”. Once logged in, select newly created database and go to “Import” tab to start importing database tables.
Select database file from local drive by clicking “Browse…” button. Please note, database file format should be either .gzip, .zip, .sql.zip or .sql. Also, if it’s larger than allowed to import file size, it might be complicated to import larger file. In such case, it might be a good idea to advice with hosting service provider in order to increase upload file size or simply ask to import database for server administrator.
After database will be successfully uploaded, we should see it’s tables by clicking on the database name.
The last thing we need to do is to adjust Joomla configuration file in order to match database, website URL, log and tmp directory path’s. Navigate to the directory where Joomla is currently uploaded and find file “configuration.php”. Open it for editing 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 values between ‘ ‘ by replacing them with correct details of database name, username and password in the new server. Database host can remain “localhost” as we will be using local MySQL server which is running in the same server as our website.
Also, we will need to change line in which website URL is defined. If we 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 we will be using different domain, find and change it in the following line:
public $live_site = ‘domain.com’;
And finally, edit path for logs and tmp directory. They can be adjusted by editing such lines:
public $log_path = '/home/username/domains/domain.com/public_html/joomla/logs'; public $tmp_path = '/home/username/domains/domain.com/public_html/joomla/tmp';
Path structure might be different comparing with local and hosting server. Therefore, we might need to adjust them accordingly.
If everything was set correctly and we don’t see any errors by checking website through web browser, we have transferred website to the new server successfully.