3

We have an existing site, version 1. We want to build a new version of the site, version 2 in a new Joomla instance so that we can ensure a cleaned up code base, but we want to do it incrementally, one component at a time.

Is there a clean way in Joomla so that we can host version 2 but still serve components from version 1 until they're replaced with corresponding version 2 components?

2 Answers 2

5

Sub folders is the best way (using a typical cpanel style install as an example).

/home/account/public_html is the main site.

/home/account/public_html/new_site is the new site.

Using a .htaccess and .htpasswd (if using apache) you can block unwanted traffic to the new site, you can also use the same database with a different prefix as well (or just a use different database, less complicated to clean later).

Joomla is great at understanding where it sits on a server, so all you need to do is go to domain.com/new_site and as long as your configuration.php file is set up correctly it should load the same as the current site, and moving it later will not hurt it.

1
  • In addition I would set robots setting in Joomla to 'No index No follow', to make sure your new site doesn't show up in index before your ready.
    – BodgeIT
    Aug 22, 2014 at 7:30
8

Actually it would be a bad idea to have a Joomla site nested inside the root of another Joomla instance. The better scenario (which would require shell access to configure) is to have each one in it's directory outside of the webroot, and symlink the files into the webroot. This way the new site can be accessed via a subdomain during testing and content could be moved between databases. When it's time to switch over, simply delete the symlink from the old site and link the new site into the webroot.

This would also make it possible to source control the entire site with git or mercurial and run a pull-only scenario for your production version without having to create a complicated deployment script.

2
  • We're trying to avoid symlinks, we've had bad experiences with them in version control in the past. We ended up not going with a separate instance of Joomla, instead we created a new directory to work in inside our existing instance. Nov 14, 2014 at 20:27
  • You wouldn't have any conflicts between version control and symlinks under the scenario I was suggesting, as you'd actually be symlinking the version controlled files elsewhere, having symlinks in your repo. Nov 14, 2014 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.