Question

I have a Joomla 2.5 development website www.mysite.com/dev. It is ready to migrate and replace the old site in root folder. Someone suggested to zip the entire subdirectory, delete the root joomla files, extract subdirectory files to root then edit the configuration php.

But how about the database? Do I need to change anything? If not, does that mean both dev and live will be linking to the same database? Will that cause a problem?

Was it helpful?

Solution

The physical location of the files in your web space is independent from the connection to the database so you can move the files to another folder and Joomla will usually work just fine.

It's possible that the development and live website point to the same database but this would not be the best way to create a new development website unless they use different prefixes. You can see which database Joomla is connecting to in Global Configuration > Server or in the configuration.php file.

You will also need to update the paths to the tmp and logs folders in Global Configuration.

You may need to update the $live_site parameter in the configuration.php file if it has been specified.

You may also need to update the .htaccess file in case any absolute or relative paths are specified in there.

When I make a development website live, I usually copy all the files and folders in the root of the website (except the /dev folder) to /old and then move everything from /dev to the root folder. You then have the old website available if needed for a while.

OTHER TIPS

If you move your site from the /dev/ folder to the root folder, you don't have to change the settings for your database. The database connection will still work just fine.

I would, however, suggest to remove the files from the /dev/ folder once you're done to avoid a penalty for duplicate content. :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top