Many Joomla 2.5 developers and web designers prefer to complete major modifications on a web site copy in a separate web folder. If they are satisfied with the result then they replace the live web site with the modified one.
For the purpose of this article we will assume that the Joomla 2.5 live web site is located in public_html directory and can be loaded through www.yourdomain.com. The copy will be set under the public_html/dev folder in the user's account.
Follow the steps listed below to complete the task:
1. Copy all of the files and folders from your Joomla 2.5 installation to the new dev directory. In our case frompublic_html to public_html/dev. If you are not sure which files and folders are included in the Joomla 2.5 installation you can find them in the <files> section of the joomla.xml file. The file can be opened through cPanel -> File Manager. You can complete the task through your favourite FTP client.
2. Reconfigure your application. You should edit your configuration.php file in the dev subfolder and make the following changes in it:
Change: public $log_path = '/home/sgtest/public_html/logs';
To: public $log_path = '/home/sgtest/public_html/dev/logs';
Change: public $tmp_path = '/home/sgtest/public_html/tmp';
To: public $tmp_path = '/home/sgtest/public_html/dev/tmp';
3. Remove the content of your cache folder (public_html/dev/cache in our case)
4. Create a new database using cPanel -> MySQL Databases, add a user with the corresponding password to it, export the Joomla live web site's database (its name can be found in the configuration.php file) through cPanel ->phpMyAdmin and import its structure and content in the newly created database.
5. Update the configuration.php file under the public_html/dev/ subfolder with the new database details. They should be entered in the following fields:
public $user = 'USERNAME';
public $password = 'PASSWORD';
public $db = 'DATABASE_NAME';
6. If you have external extensions that need additional reconfiguration regarding the path or the database details modify their setup.
Now when you reload your website it should be working flawlessly from its new location.
Joomla is a powerful software that is easy to work with once you have the right host to support you. Before you lose any more time with the wrong host, check out the hostlantern Joomla hosting offer.