Twitter :

Services

Featured Project

Migrating Your Joomla Web Site To A New Server
Blog
Thursday, 17 November 2011 20:15

Some find the thought of migrating servers a daunting task, the following tutorial explains just how simple it actually is

 

 

Step 1

Backup Your Source Files

This can be done simply by logging in to your web site via FTP or via its control panel and downloading all of the files. I personally like to use a FTP program such as FileZilla. Make sure you get all of the files in your live public directory. Majority of servers either have a default public directory of “public_html” or “html” or "www".

Step 2

Backup Your Database

Download LazyBackup and install onto your Joomla web site.

This program will take a backup of your database and email it to you, its that simple.

 


3) Upload your site

Next you’ll have to FTP in to your new server and upload all of your files.


4) Database migration

The easiest way is to use a database tool such a phpMyAdmin. This will allow you to create a new database and then simply upload the backup that you have made to it.

Access your web hosting control panel, and create a new database giving it username permissions or whatever your server requires, my server is running cpanel so I will be able to answer questions on cpanel based backups/migrations.

Once in php my admin, select your database that you have just created and import the sql database that was sent to your email inbox earlier.


5) Updating the configuration

You willneed to update all of the database related information including the new database name on your server, username and password in your configration.php file, this file can be found in the main ftp directory and is called "configuration.php". Simply look for the old database username, password and database name and update to your new ones.

This is enough to get your site back up and running on your server. You’ll will then have to change all of the log directories and the temp folders to match that of your new server as well. Once you’ve update just upload it all to your new server and you should be ready to go.

Here is a list of all the variables that you are most likely going to need to change and update to match your new server

var $log_path = ‘/;
var $tmp_path = ‘/’;
var $ftp_enable = ’1?;
var $ftp_host = ‘;
var $ftp_port = ’21?;
var $ftp_user = ”;
var $ftp_pass = ‘;
var $ftp_root = ‘/’;
var $dbtype = ‘mysql’;
var $host = ‘localhost’;
var $user = ”;
var $db = ”;
var $dbprefix = ‘jos_’;
var $password = ”;

Here is an explanation of each of the variables to help you on your way.

$log_path
This is the default location where your log files are kept. A common log path would look something like this “/home/accountname/public_html/log”


$tmp_path
The tmp path is where temporary files are stored during the installation of components, backups, modules and plugins. “/home/accountname/public_html/tmp”

$ftp_enable
It might be best to have this switched off and set to 0 as a start. If this is set to 0 then the other variables, $ftp_user, $ftp_pass and $ftp_root will not have to be set.

$ftp_port
This is the default value for your FTP port. It is usually set at 21

$ftp_user
This is the username for the accounts FTP

$ftp_pass
The password for the ftp account

$ftp_root
This is the root level of your site. In most cases it will be as follows “/home/accountname/public_html/” Replace accountname with the appropriate account name and path.

$user
This refers to the username of the database that you would have set up in phpMyAdmin on your new server

$db
This refers to the database name of the new database that you would have set up on your new server

$dbprefix
As a default this is “jos_”. to help increase security on your sites, you may wish to change this to something else to increase the level of security on your website.

$password
This is the password that relates to your database.


6) Updating Folder Permissions

If you are using Joomla 1.5.x and have FTP enabled on your site then you should not have to do this step as the system itself can simply overide permissions and do what it needs to do.

If you don’t or you are having some issues with folder permissions then you’ll need to update the permissions to some of the folder in your installation directory.

These include:

/cache
/tmp
/log
/images

You’ll need to change the permissions on these folders to 755 or all read and write. This previously read 777 and as a security measure, it should be set to 755. Under no circumstance should any folders in your Joomla installation to 777.

If you’re changing from one live server to another then you’ll have to update the name servers for your domain and that is a little beyond the scope of this step by step tutorial but if you’re migrating from a local development server then you should be all ready to go.

 

Add comment


Security code
Refresh

Interesting Links