How to Install Joomla in a Subdirectory
Installing Joomla in a subdirectory places the site below another URL path, such as https://example.com/joomla/ or https://example.com/help/, instead of at the domain root. The installation process is the same basic Joomla web installation, but the file location, URL, rewrite rules, and any existing parent site need extra attention.
1. Choose the subdirectory and URL
Decide the final path before uploading files. If the domain's document root is /public_html/ and you want Joomla at https://example.com/help/, the Joomla files would typically live in a directory such as /public_html/help/. Hosting layouts vary, so confirm the domain's real document root in the hosting panel.
Check that the chosen path does not already contain application files or data you need. If it does, make a verified backup before changing anything.
2. Create the database
Create a database and dedicated database user before starting the installer. Record the database host, database name, username, and password. The database credentials are independent of the Joomla Super User account.
3. Upload Joomla into the subdirectory
- Download the current Joomla installation package from the official Joomla project.
- Create the intended subdirectory under the correct web root.
- Upload and extract the package so files such as
index.phpand Joomla's directories are directly inside the chosen subdirectory. - Do not accidentally create an extra nested folder such as
/help/Joomla_6.x.x-Stable-Full_Package/. - Confirm the web server can read the files and has the permissions required for installation.
4. Open the subdirectory URL
Browse directly to the final subdirectory URL, for example:
https://example.com/help/The Joomla installer should open. If the parent site's homepage appears instead, returns a 404, or redirects elsewhere, inspect the parent application's rewrite/redirect rules and the hosting configuration for that path.
5. Complete Joomla installation
Enter the Site Name, create the initial Super User, and provide the database connection details. Joomla normally generates a random database table prefix; accept it unless you have a specific reason to choose another unique prefix. Complete the installation and confirm both the frontend and the Administrator URL load under the subdirectory.
6. Configure URL rewriting carefully
Joomla can run in a subdirectory with SEF URLs. If you enable URL rewriting on Apache, use the htaccess.txt supplied with Joomla as the starting point and rename it to .htaccess as required by Joomla's SEF configuration. If rewrite rules need an explicit base in your environment, it must reflect the subdirectory rather than the domain root. Nginx and other web servers require their own server configuration instead of Apache .htaccess rules.
Do not copy a root-site rewrite file blindly over a working parent site's configuration. Parent and child rewrite rules can interact.
Common subdirectory problems
- Installer does not open: confirm Joomla was extracted into the intended directory and PHP is enabled there.
- 404 errors after enabling SEF: review rewrite configuration and the subdirectory path.
- Parent site captures Joomla URLs: inspect redirects/rewrite rules above the Joomla directory.
- Assets load from the wrong path: clear caches and look for hard-coded root URLs in template or extension configuration.
- Wrong site installed: verify the domain/subdirectory maps to the filesystem location you edited.
Verify before launch
Test the homepage, several menu links, Administrator login, media/CSS/JavaScript loading, and both SEF and non-SEF behavior as applicable. If the subdirectory is intended to remain permanent, use that final URL in integrations and canonical/SEO configuration. If this is only a staging location that will later move to the domain root, plan the move as a separate migration and re-check URLs, redirects, cache, and server rules afterward.
Need More Help with Joomla?
Still having trouble? Open a support ticket with QuantaCade Support and we'll be happy to help where we can.
Support priority is given to QuantaCade products, services, and customers. However, we're also happy to assist fellow Joomla users with general Joomla questions and troubleshooting when possible.
QuantaCade is an independent Joomla extension developer and is not official Joomla support. Some issues involving third-party extensions, hosting environments, server configurations, or other systems outside our development control may be beyond what we're able to resolve.