This page applies only when restoring a Joomla! 5.0 or later site with a custom Public Folder. If this is not the case, the Off-site Directories page will be shown instead.
Joomla! 5 and later has a feature for expert users which allows you to place your Joomla installation (Joomla's files, including its core files and third party extension files) outside the web root (the directory from which your site is served by the web server).
![]() | Important |
---|---|
Even though it's been described as a “security feature” it has absolutely nothing to do with security. The only illusion of “security” it offers is that you cannot access non-public PHP files directly over the web. This has always always been possible by a thoughtfully written .htaccess (Apache, Litespeed), web.config (Microsoft IIS), or nginx.conf (NginX) configuration file – just like the one created by our own Admin Tools Professional software. Using a split public / private filesystem structure vastly increases the complexity, requires manual configuration, raises the bar of minimum required experience, runs the chance of third party extensions breaking, and makes backup restoration on tight disk space practically impossible. Using a server configuration file to prevent access to non-public files has none of these drawbacks. The only perceived drawback is that your web server might not allow you to use a server configuration file. But, hey, it's no longer the late 1990s / early 2000s. If you find a server like that it's an outlier. You can easily find a much better configured and maintained server for the same or lower price if you spend a fraction of the time it would take you to configure a public folder. If you were thinking of implementing this kind of configuration for “security reasons” — don't. |
BRS allows you to restore sites using Joomla's Public Folder feature, and to even convert them back into a standard installation where everything is under the web root.
The private files (your Joomla installation files) are
extracted where the backup archive itself is extracted. The files
which were in your public folder are extracted under the directory
external_files/JPATH_PUBLIC
. The Public Folder
page in BRS allows you to figure out what to do with them.
The Use custom public folder option controls whether you want to use a separate public / private folder structure. Enable it to keep the split directories configuration. Disable it to convert your site into a standard installation where everything, public and private, is stored under your web root.
If the Use custom public folder option is
enabled, you will also see the Public folder
option which allows you to move the files from
external_files/JPATH_PUBLIC
into the folder you
specify here.
A site with a custom public folder can have two entirely different restoration scenarios.
A. Keep the site split into a public and Joomla installation folder (the public folder can be the same, or different than the backed up site).
In this use case, the easiest way to restore your site is extracting the backup archive into the private Joomla! installation folder and use the CLI to restore the site.
Alternatively, you can follow a slightly more convoluted process as long as you are using the Apache web server:
Extract the backup archive into your private Joomla installation folder using Kickstart's CLI mode.
- OR -
Extract the backup archive into your public root with Kickstart, then copy all extracted files into your private Joomla installation folder.
Create a new .htaccess
file in your
public folder with the following contents:
Alias /installation /path/to/your/public_folder
where
/path/to/your/public_folder
is the
absolute filesystem path to your public folder, e.g.
/var/www/html
.
If necessary, go to your hosting control panel and change the PHP version of your site to the one that is suitable for the site you are restoring.
In this case, you can proceed with the restoration up until
this Public Folder step. When you click may get a 404. If this
happens, DO NOT close the browser window/tab. Instead, edit the
.htaccess
file in your public folder and add
the Alias line shown above at the top of the
.htaccess
file. Then, if necessary, go to your
hosting control panel and change the PHP version of your site to the
one that is suitable for the site you are restoring. Finally, reload
the page to show the next step of the installer.
After you complete the site's restoration edit the
.htaccess
file again and remove the Alias
line.
B. Make it so that the Joomla installation folder AND the web root (public folder) are the same, i.e. a regular Joomla! installation. In other words, undo the split into a public folder and a private installation.
This is the most common case, once the user realises all the downsides to using a custom public folder, including the fact that many third party extensions will outright fail to work with it properly. The idea here is that we want to take the backup of a site split into a public and private folder, and somehow join them back together so that the whole lot is hosted under the public web root like a regular Joomla site.
To do that, extract the backup archive into the public web root just like you would do with any other backup.
When you reach the Public Folder page, change the Use custom public folder option to No (the toggle is in the off / gray position), then click on . BRS will dispose of the backed up public folder files and change the site's configuration to present it as a unified site.
![]() | Important |
---|---|
If you had files or folders in your public folder you'd like
to keep, please copy them from the
|