You can run Drupal on HostGator shared hosting, but only if you switch the account to PHP 8.3 first and build the site with Composer on your own machine before uploading it. Drupal 11 dropped support for PHP 8.1 and 8.2, and HostGator’s shared servers still default to a lower version than Drupal 11 accepts. Get that one setting right and the rest of the install is a standard cPanel workflow.
composer create-project drupal/recommended-project locally, upload the built tree so that web/ maps to your document root, then visit the site and run the install wizard. Budget an hour and expect to raise memory_limit and max_execution_time.Drupal is heavier than WordPress in every dimension that shared hosting rations: PHP memory, process time, file count and database round trips. That does not make HostGator a bad choice, it just means the entry level plan is a tight fit and a Business plan with SSH is a much more comfortable one. This walkthrough covers the honest version of both routes and tells you where each one stops working.
Check what your plan actually gives you
Before touching anything, confirm three things in cPanel. The available PHP versions, whether SSH is enabled, and how much disk and inode headroom you have. HostGator documents that the minimum PHP version on its shared servers is 8.1 and that PHP 8.3 became selectable in January 2024, which is the version Drupal 11 needs as a floor.
| Requirement | Drupal 11 needs | Drupal 10 needs | Where to check on HostGator |
|---|---|---|---|
| PHP version | 8.3 or 8.4 | 8.1 through 8.4 | cPanel > Software > MultiPHP Manager |
| Database | MySQL 8.0 or MariaDB equivalent | MySQL 5.7.8 or later | cPanel > Databases > MySQL Databases |
| PHP extensions | pdo, gd, mbstring, xml, opcache | Same list | cPanel > Software > Select PHP Version |
| Shell access | Strongly recommended | Strongly recommended | Available on Linux plans except Optimized WordPress |
| Clean URLs | mod_rewrite via .htaccess | Same | Enabled by default on Apache |
The Drupal PHP requirements page is the authoritative source here and it changes with each minor release, so check it rather than trusting a tutorial. If your account cannot reach PHP 8.3, install Drupal 10 instead. It is still supported and it runs on PHP 8.1.
Set the PHP version and limits
In cPanel open Software, then MultiPHP Manager. Tick the domain, choose PHP 8.3 from the dropdown and click Apply. You can also reach this from the customer portal under Websites, Manage Site, Advanced, Change PHP Version.
Then open MultiPHP INI Editor and raise the values Drupal leans on. A stock shared configuration will fail the install wizard or time out halfway through a module update.
memory_limit = 256M
max_execution_time = 300
max_input_vars = 5000
post_max_size = 64M
upload_max_filesize = 64M
opcache.enable = 1phpinfo() rather than assuming it applied. That ceiling is the single most common reason a Drupal install fails on an entry level plan.Create the database and user
Go to Databases, then MySQL Databases. Create a database, create a user with a long random password, then add the user to the database with All Privileges. HostGator prefixes both names with your cPanel username, so a database you name drupal becomes something like cpuser_drupal. Write down all three values exactly, including the prefix, because the install wizard will not guess them for you.
localhost as the database host. Shared cPanel accounts run MySQL on the same machine, and pointing at a hostname or IP tends to fail on the remote access allowlist.Build the site with Composer, locally
This is the step that trips people up. Modern Drupal is a Composer project, not a zip file you unpack. Downloading a tarball and uploading it works for a bare core install and then falls apart the first time you add a contributed module. Build on your own machine where PHP, Composer and memory are unconstrained, then move the result.
# On your laptop, with PHP 8.3 and Composer 2 installed
composer create-project drupal/recommended-project my-drupal-site
cd my-drupal-site
# Add the modules you actually need before uploading
composer require drush/drush
composer require drupal/admin_toolbar drupal/pathauto drupal/metatag
# Strip development files so you upload less
composer install --no-dev --optimize-autoloaderThe recommended-project template puts the public files in a web/ subdirectory and keeps vendor/, composer.json and composer.lock above it. That layout is deliberate and you want to preserve it, because leaving vendor/ inside the document root exposes library code to the internet.
Upload and point the document root
You have two ways to get the tree onto HostGator, and they differ mainly in how long you wait.
Route A, compressed upload through File Manager. Zip the whole project locally, upload the single archive through cPanel File Manager, and extract it on the server. A Drupal project is tens of thousands of small files, and FTP transfers each one individually, so a zip that uploads in two minutes can take forty over FTP.
Route B, SSH and Git. HostGator offers shell access on Linux plans other than Optimized WordPress, on port 2222 for shared accounts. If you have it, clone your repository directly and skip the upload entirely.
ssh cpaneluser@yourserver.hostgator.com -p 2222
cd ~
git clone https://github.com/you/my-drupal-site.git drupalapp
cd drupalapp
# Composer may or may not be on PATH. Fetch it if not.
curl -sS https://getcomposer.org/installer | php
php composer.phar install --no-dev --optimize-autoloaderNow make web/ the served directory. In the customer portal, edit the domain and set the document root to /home/cpaneluser/drupalapp/web. If your plan does not let you change the document root for the primary domain, the fallback is to place the contents of web/ in public_html and move vendor/ one level above it, then edit autoload.php to point at the new vendor path. It works, it is ugly, and it is a good argument for an addon domain or a subdomain instead.
Run the installer and lock things down
Before loading the site, prepare the settings file and the files directory.
cd ~/drupalapp/web
mkdir -p sites/default/files
cp sites/default/default.settings.php sites/default/settings.php
chmod 666 sites/default/settings.php
chmod 755 sites/default/filesVisit https://yourdomain.com/core/install.php, choose the Standard profile, and enter the prefixed database name, user and password with localhost as the host. When the wizard finishes, immediately tighten the permissions it asked you to loosen.
chmod 444 sites/default/settings.php
chmod 555 sites/defaultThen add a cron entry, because Drupal will not run its own maintenance. In cPanel open Advanced, Cron Jobs, and schedule this every fifteen minutes using the cron key from Administration, Configuration, System, Cron.
/usr/bin/curl -s "https://yourdomain.com/cron/YOUR_CRON_KEY" >/dev/null 2>&1Finally, set up backups before you build anything real. Our guide to backing up a site manually uses WordPress as the example but the database dump and file archive routine is identical for Drupal.
The honest verdict on shared hosting for Drupal 11
Drupal 11 will run on a HostGator shared plan. Whether it should is a different question. Shared accounts cap concurrent PHP processes and memory per process, and Drupal’s render pipeline is memory hungry compared to a typical PHP application. A brochure site with page cache and dynamic page cache enabled behaves fine. A site with authenticated users, Views heavy pages, or a media library will feel slow in ways no amount of tuning fixes.
| Site type | Shared plan | Better option |
|---|---|---|
| Mostly anonymous brochure site | Workable with caching on | None needed |
| Blog or news site with editors | Tight but viable on Business | VPS once editors complain |
| Membership or intranet | Not recommended | VPS with Redis or Memcached |
| Drupal Commerce store | No | Dedicated VPS, 4 GB or more |
| Multisite install | No | VPS with root access |
If you land in the bottom half of that table, a plain Ubuntu VPS is the right move and the setup is not much harder. Our walkthrough on running Drupal on Linode covers the LEMP version of this same install. For a comparable cPanel workflow on a different host, the MODX on Bluehost guide follows the same shape with a lighter CMS.
Troubleshooting
White screen after the install wizard. Almost always memory. Add ini_set('memory_limit', '256M'); temporarily to the top of web/index.php to confirm, then fix it properly in MultiPHP INI Editor. Check ~/logs or the cPanel Errors page for the actual fatal.
“The website encountered an unexpected error” with no detail. Turn on error display by adding $config['system.logging']['error_level'] = 'verbose'; to sites/default/settings.php, reload, read the trace, then remove the line. Never leave verbose errors on a live site.
Every page except the front page returns 404. The .htaccess file did not upload, usually because your FTP client hides dotfiles. Confirm web/.htaccess exists and is not zero bytes, and enable hidden file display in File Manager.
Composer fails on the server with a memory error. Shared PHP CLI often has a low memory cap. Run php -d memory_limit=-1 composer.phar install, or better, build on your laptop and upload the result as described above.
Images upload but never display. The sites/default/files directory is missing or not writable, or the private file path points somewhere that does not exist. Check Administration, Reports, Status report, which flags both conditions directly.
Frequently asked questions
Does HostGator support Drupal 11?
Yes, provided you switch the account to PHP 8.3 in MultiPHP Manager and use a MySQL 8 server. Drupal 11 refuses to install on PHP 8.1 or 8.2. If your plan cannot select 8.3, install Drupal 10 instead, which still receives support and runs on 8.1.
Can I install Drupal from Softaculous on HostGator?
One click installers do exist, but they typically deploy an older tarball layout without Composer metadata. That means you cannot add contributed modules or run core updates the supported way later. Building with Composer takes twenty extra minutes and saves a rebuild.
Do I need SSH to run Drupal on HostGator?
Not strictly. You can build locally, upload a zip, and drive everything through cPanel and the browser installer. SSH makes updates, cache clears and Drush enormously faster, so if your plan includes it on port 2222, use it.
Where should the vendor directory live?
Above the document root, never inside it. The recommended project layout already does this by serving web/ and keeping vendor/ as a sibling. If you are forced to serve from public_html directly, move vendor/ up one level and edit the autoload path.
How do I update Drupal core on shared hosting?
Run composer update drupal/core-recommended --with-all-dependencies in your local checkout, test it, then upload the changed directories and run /update.php or drush updb. Take a database dump first. Updating in place through the browser is not supported for Composer managed sites.
The bottom line
Launching Drupal on HostGator is mostly a sequence of three correct settings: PHP 8.3 selected in MultiPHP Manager, a raised memory limit, and a document root that points at web/. Build the project with Composer on your own machine, move it up as one archive or a Git clone, and the browser installer handles the rest in a few minutes.
Where it gets uncomfortable is after launch. Shared hosting rations exactly the resources Drupal spends most freely, and no configuration trick moves that ceiling. Treat a shared plan as fine for a cached, mostly anonymous site and plan the move to a VPS the moment you add authenticated traffic, commerce or a serious media library. Deciding that up front is much cheaper than migrating under pressure.
