How to Install Joomla on a Subdomain
Installing Joomla on a subdomain gives the site its own address, such as portal.example.com, while keeping it under an existing domain. The key is to make the subdomain point to the correct document root before you upload Joomla. Once DNS, the document root, PHP, and the database are ready, Joomla's normal web installer handles the rest.
1. Decide the subdomain and document root
Choose the hostname first, for example portal.example.com or members.example.com. Your hosting control panel must map that hostname to a directory that will contain the Joomla files. Do not assume that a folder named portal automatically becomes portal.example.com; the web server and DNS must actually be configured for that hostname.
On current cPanel installations, subdomains are created from the Domains interface by creating a new domain using the full subdomain name. When the account permits a separate document root, make sure it points to the directory you intend to use for Joomla. Other hosting panels use different labels, but the same principle applies: the subdomain needs a DNS record and a web-server document root.
2. Allow DNS and HTTPS to become ready
After creating the subdomain, confirm that it resolves to the correct hosting server. DNS changes are not always immediate. If the hostname does not resolve yet, Joomla cannot be reached through it even if all files are already on the server.
Also confirm that HTTPS is available for the subdomain. Many managed hosts automatically request a certificate after a domain or subdomain is added, but certificate issuance can take longer than the local control-panel change. If https://portal.example.com produces a certificate warning, fix the certificate or hosting configuration before treating the Joomla installation as production-ready.
3. Confirm the hosting environment can run Joomla
The subdomain normally uses the same hosting account as the parent domain, but it may use a different PHP configuration or document-root policy. Confirm that the PHP version, required PHP extensions, database server, and web server meet the requirements of the Joomla version you plan to install. If the host allows per-domain PHP selection, verify the setting for the subdomain itself rather than assuming it inherited the parent domain's configuration.
4. Create a database and database user
Create a new database for the Joomla site and create a database user with the privileges needed to create and manage Joomla's tables. Record the following values exactly:
- database host, commonly
localhostbut sometimes a provider-specific hostname; - database name;
- database username;
- database password.
These credentials are separate from the Joomla Super User account you will create later. Using a dedicated database and database user makes the new subdomain installation easier to manage and reduces the chance of accidentally mixing tables from unrelated applications.
5. Upload Joomla to the subdomain's document root
Download the current Joomla Full Package from the official Joomla Downloads site. Upload the archive to the document root assigned to the subdomain, then extract it there. Server-side extraction is usually faster and less error-prone than unpacking Joomla locally and transferring thousands of individual files.
After extraction, make sure Joomla's files such as index.php, administrator, components, and installation are directly inside the subdomain document root. A common mistake is leaving them one directory too deep, for example /portal/Joomla_6.x.x-Stable-Full_Package/. In that case the subdomain will not start the installer at its root URL.
6. Run Joomla's web installer
Browse to the HTTPS address of the subdomain, for example:
https://portal.example.com/Joomla should open its installation screen. Complete the installer in order:
- Choose the installation language and enter the Site Name.
- Create the Super User using a real name, non-obvious username, strong unique password, and valid email address.
- Enter the database type and the database host, username, password, database name, and generated table prefix.
- Start the installation and wait for Joomla to report success.
Do not use the Joomla administrator password as the database password unless they happen to be independently generated values. They protect different systems and should normally be different.
7. Verify the subdomain installation
After installation, test both the frontend and Administrator URLs:
https://portal.example.com/
https://portal.example.com/administrator/Confirm that pages, CSS, JavaScript, and images load from the subdomain rather than the parent domain. Log in to Administrator, verify that Joomla reports no obvious environment problems, and test more than just the home page. If you plan to enable Search Engine Friendly URLs or URL rewriting, do so only after the basic site works at the subdomain address.
Common problems when installing on a subdomain
- The parent website appears instead of Joomla: the subdomain is probably sharing or pointing to the wrong document root.
- The hostname does not resolve: check the DNS record and allow time for DNS changes to propagate.
- HTTPS gives a certificate warning: wait for or repair the certificate for the subdomain before launch.
- The installer opens at an unexpected extra path: Joomla was probably extracted into a nested package folder instead of directly into the subdomain root.
- A database connection error appears: re-check the database host, database name, username, password, and user privileges.
- The subdomain returns a PHP error while the main domain works: verify the PHP version and per-domain PHP settings applied to the subdomain.
- Redirects send the subdomain to the main site: inspect hosting redirects and any parent-level web-server or
.htaccessrules that may also affect the new hostname.
Before making the subdomain public
Confirm that the final hostname and HTTPS URL are the ones you intend to keep. Then configure backups, update Joomla to the current patch release if necessary, remove any leftover installation archive from the public directory, and verify email delivery, scheduled tasks, and any third-party extensions you add. If the subdomain is only a staging site, protect it from unintended public access and indexing rather than treating it as a normal production site.
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.