Problem/Motivation

Currently Drupal CMS suggests either a local ddev install or a hosted demo. It was pointed out in slack that WordPress' installation instructions assume you're going to upload it to a shared hosting account.

Given Drupal CMS is aimed at newer Drupal users and smaller sites, it is probably worth looking at whether hosting it on shared hosting is actually possible.

The main issues are likely to be peak memory usage, and also whether package_manager/automatic updates runs.

This seems like something that a lot of people could help test with different hosting providers, and then compile the results here or elsewhere.

Steps to reproduce

Proposed resolution

For each shared hosting provider, take the following steps, someone can 'claim' a shared hosting provider before they start to reduce duplication.

1. Check that they offer PHP/MySQL versions that meet Drupal's requirements.
2. Sign up for an account
3. Figure out how to get the Drupal CMS onto the server (sftp, uploading the zip to cpanel and extracting it etc.). If there are multiple ways, make notes on the various options
4. Try to run the installer and document any problems you run into.
5. Try various things like installing additional recipes via project browser, installing a module via project browser, installing and uninstalling modules via extend, posting content etc. and look for any errors, particular slowness, or dblog messages.
6. Post a summary of the above to this issue.

User interface changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#20 image.png184.53 KBdanieluxury

Comments

catch created an issue. See original summary.

pameeela’s picture

Agreed, this would be great to have!

catch’s picture

Issue summary: View changes

Adding some rough ideas on how to collect data to the issue summary

pendragn’s picture

Argh, I am having issues as well!  This is on shared hosting, but I have SSH composer access, etc.  Created MySQL DB and ran

"composer create-project drupal/cms"

...install seems to go fine on the command line.  Navigating in browser to webserver CMS homepage, I am greeted with a Requirements review, where the only thing wrong is no OPCache....everything else OK.  I hit "continue anyway".

Reach Get Started Screen, no pre-configured type selected, click Next (all good so far).  Give site a name (all good so far).  Fill in MySQL DB login entries, click save and continue.  Enter in email and password for new user account.

Get to "setting up your site" progress bar.  Progress bar reaches end all fine.  Then the errors flash on screen and the site is not reachable at all through the browser:

3x error boxes all with the error at the bottom:  "RuntimeException: Failed to start the session because headers have already been sent ..... at line 296"

Continuing to the error page I get this:  

RuntimeException: Failed to start the session because headers have already been sent by "/home/honeyp7/public_html/MYDOMAIN/web/cms/web/core/includes/errors.inc" at line 296. in Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (line 116 of /home/honeyp7/public_html/MYDOMAIN/web/cms/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php).

Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (Line: 128)
Drupal\Core\Session\SessionManager->startNow() (Line: 93)
Drupal\Core\Session\SessionManager->start() (Line: 59)
Symfony\Component\HttpFoundation\Session\Session->start() (Line: 1566)
install_bootstrap_full() (Line: 695)
install_run_task() (Line: 572)
install_run_tasks() (Line: 121)
install_drupal() (Line: 53)

Anyone know any ideas why this error is happening?

catch’s picture

@pendragn this issue was more for Drupal CMS contributors to try installing Drupal CMS on shared hosting and report back, hopefully to pre-empt some of the issues you're having on different hosts. For actual support, you would probably get better answers in #drupal-cms-support on Drupal slack.

Having said that, this error you pasted shows that the installer didn't complete successfully. You should try wiping your database and re-installing, I would do so without any of the optional recipes to minimise what needs to be installed. If you end up in exactly the same place again, it'd be good to report that back here but real-time (or closer to real time) help on slack will probably help you get going faster. Also if you're able to share details of which shared host you're on that would be really useful for the purposes of this issue.

Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (Line: 128)
Drupal\Core\Session\SessionManager->startNow() (Line: 93)
Drupal\Core\Session\SessionManager->start() (Line: 59)
Symfony\Component\HttpFoundation\Session\Session->start() (Line: 1566)
install_bootstrap_full() (Line: 695)
install_run_task() (Line: 572)
install_run_tasks() (Line: 121)
install_drupal() (Line: 53)
juxelle’s picture

Drupal CMS works on Ventraip shared hosting.

Steps taken:
- Created a new database and database user
- Switched on missing required PHP extensions (gd, pdo, pdo_mysql, mbstring, opcache)
- Used cpanel Terminal to run "composer create-project drupal/cms newdirectory" from the home directory
- Used cpanel Domains->[domain name]->manage to change the root directory of one of my addon domains to newdirectory/web
- Installed using the UI with the news recipe selected
- Switched the site to maintenance mode

The site runs great, pages are fast to load. I created new content and installed modules from the Extend->List tab successfully.

Notes
=====
- After running composer create-project I'm instructed to run ./launch-drupal-cms.sh. I ignored it as that's just for ddev... isn't it?

- Trusted Host Settings error. Not able to change it directly in cpanel, had to use ftp to download the file, change locally and upload to get around permission errors even after the file was chmod 777. Easy to fix but breaks the idea of everything possible from the browser so I'm mentioning it here.

Issue
=====
Drupal CMS can't find composer. Error messages that Composer is not found are shown:
-- in the status report
-- in Extend->Browse tab
-- in Extend->Recipes tab
-- in Extend->Update tab

Visiting Extend->Update Extensions tab triggers an error. "The website encountered an unexpected error. Try again later."
The Exception is: PhpTuf\ComposerStager\API\Exception\LogicException: The composer executable cannot be found. Make sure it's installed and in the $PATH in PhpTuf\ComposerStager\Internal\Finder\Service\ExecutableFinder->find() (line 34 of [path-to]/vendor/php-tuf/composer-stager/src/Internal/Finder/Service/ExecutableFinder.php).

So the Drupal CMS install works, I just can't perform updates through the UI that require composer. I can do it through the terminal though.

catch’s picture

Thanks for testing! This is really useful.

- After running composer create-project I'm instructed to run ./launch-drupal-cms.sh. I ignored it as that's just for ddev... isn't it?

Yes it is, the language should be removed as a prompt I think, can stay in a README.md and online docs - could you open an issue?

- Trusted Host Settings error. Not able to change it directly in cpanel, had to use ftp to download the file, change locally and upload to get around permission errors even after the file was chmod 777. Easy to fix but breaks the idea of everything possible from the browser so I'm mentioning it here.

I think this needs a core issue to discuss, e.g. can we still tell people they could do this, but make it 'info' rather than 'error'.

Visiting Extend->Update Extensions tab triggers an error. "The website encountered an unexpected error. Try again later."
The Exception is: PhpTuf\ComposerStager\API\Exception\LogicException: The composer executable cannot be found. Make sure it's installed and in the $PATH in PhpTuf\ComposerStager\Internal\Finder\Service\ExecutableFinder->find() (line 34 of [path-to]/vendor/php-tuf/composer-stager/src/Internal/Finder/Service/ExecutableFinder.php).

This is quite serious. First of all the error should be handled by either package_manager or automatic_updates module so it's not fatal. Secondly we would want people on shared hosting to be able to use the module - could you open an issue against core package_manager to start with? It might need to be moved/split elsewhere but that's probably in the middle of where it would need to be moved to.

kathc’s picture

It's not shared hosting, but I wrote a very brief blog post about installing on Cloudways (it just worked after a few settings). https://alakasam.ca/node/32 .

After installing, I added another recipe, then a couple of modules, using Project Browser.

I agree with the other commenters that the next thing for any site builder would be installing/changing the theme in the browser. I've been using DXPR theme lately because after install, I can do everything in settings.

kristen pol’s picture

dunx’s picture

Great topic.

The three hosting providers being recommended by Drupal at https://new.drupal.org/drupal-cms/trial under the Ready to launch? Find a Drupal host heading (Acquia, Pantheon and Platform.sh) are very unlikely to be the sort of service that somebody who wants to knock up a quick website can afford. I know there's some free/time-limited options, but these are typically £$€100s per month, when users are probably looking for that per year. We risk putting new users off immediately and losing them very quickly and forever if they believe those are the necessary or typical costs for hosting Drupal CMS.

juxelle’s picture

juxelle’s picture

I also have an old A2Hosting shared hosting account.
I tried to install Drupal CMS there but no success. The database version was lower than the minimum required.

It's an old account so I can't really say if someone purchasing one today would have the same issue.

gábor hojtsy’s picture

Adding automatic updates hosting test issue, where I tested Dreamhost and Siteground. Those test issues are at https://www.drupal.org/project/issues/search?issue_tags=hosting%20test

volanar’s picture

I tried to install drupal through the web installer several times, but the installation ended with errors. There have always been different mistakes, so I'll wait for it to be fixed.
And the biggest problem of the installation is the new database versions. The developers are guided by the date of database support, but do not take into account that each hosting has different versions of databases that cannot be updated with drupal. Therefore, drupal has taken a big step back by allowing only new versions of databases to be installed. But for example, postgres 15 support will end in 3 years, and drupal with postgres 15 cannot be installed with drupal version 11. Why not do it in two years?

chrisfromredfin’s picture

We're working on a number of similar issues over at https://www.drupal.org/project/project_browser/issues/3453713 and I am starting to think we may be duplicating efforts here. PRIMARILY, the question is whether or not PACKAGE MANAGER can work on these hosting environments, and Project Browser, Automatic Updates (and therefore Drupal CMS capitalizing on those features) follow suit from there.

Should we move all of our various METAs into the core queue with component Package Manager or into a documentation issue queue?

In my ideal world, we would have a list of like "Making modern Drupal work on {Hostinger, Cloudways, GoDaddy}" documentation pages...

dunx’s picture

Yes to the ideal world of @chrisatredfin :)

Do the Drupal Association have any bandwidth to speak to the any of the big cheap hosting providers to help us help them?

Many of them already say they can host Drupal, whilst still using the old Drupal 8 logo for example. Perhaps it's in their interest to be more proactive in this respect. They would also be doing some marketing for Drupal CMS in getting their solutions out in front of their massive user base

gábor hojtsy’s picture

I think there are some extra considerations for Drupal CMS, due to the size of shipped packages especially with Experience Builder (which was an issue for Drupal Forge for example recently). Also memory requirements, and similar things. But otherwise I think the testing is similar indeed.

However I think ultimately we would want documentation about Drupal CMS running on shared hosts, so from that perspective, running the process with Drupal CMS itself would be best.

gábor hojtsy’s picture

Title: Test (and then possibly document) installing on shared hosting » Test (and then possibly document) installing Drupal CMS on shared hosting

Making title more explicit for sharing :)

catch’s picture

We're working on a number of similar issues over at https://www.drupal.org/project/project_browser/issues/3453713 and I am starting to think we may be duplicating efforts here.

Yes me too, I didn't realise that issue was already open.

But also fully agreed with Gabor's points - just Drupal core + project browser might not show up potentially showstopper issues with things that memory usage that could be exposed by Drupal CMS, purely down to more projects in the code base/installed as well as the recipe system being in use. So it would be good to expand the scope of the original issues if we can?

danieluxury’s picture

StatusFileSize
new184.53 KB

Composer2 - Hostinger shared hosting problem.

I installed Drupal CMS on Hostinger Shared account trough ssh, on a subdomain (daniel.seriousdesign.net) , following this procedure:

  • Created subdomain.
  • Created a database.
  • Access ssh, and subdomain folder.
  • Execute
  • composer2 create-project drupal/cms .
  • cd daniel
  • git init
  • Add a .gitignore file https://www.drupal.org/project/drupal_cms/issues/3500134
  • Visit site and configure
  • Did not work, not sure why, but I modified settings.php to enable settings.local.php
  • $settings['config_sync_directory'] = '../config/sync';
  • $settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
  • $config['system.logging']['error_level'] = 'verbose';
  • $config['system.performance']['css']['preprocess'] = FALSE;
  • $config['system.performance']['js']['preprocess'] = FALSE;
  • vendor/bin/drush cr

site started working.

upload repository on github, cloned and performed composer install, but workflow was not what I expected.

But when I visit admin/reports/status I get the errors on attached image.

I am not a seasoned developer, so maybe what I was doing trying to create a development workflow on new Drupal CMS.

gábor hojtsy’s picture

I bought Bluehost's cheapest plan today. They install WordPress in every single plan automatically. It takes a lot of care to find where to install Drupal but one can go to their Hosting page, then find the "Cpanel" link (I know this, but not sure general people would know what Cpanel is). Then scroll all the way to the bottom. Drupal is not listed there. CMS/Portals is a category that is offered, and THAT lists Drupal 11.

This is on a software called Softaculous that is embedded in CPanel. It has 3 Install buttons for Drupal, one does not do anything, the second only switches to other install options, the real one is placed near a "Send instructions in email" field, which is strange and I was ready to receive the instructions in email. But it did attempt to install. It cannot install because .htaccess and index.php were present (from WordPress). It offered to replace them or for me to pick a subdirectory. It would not replace the whole of WordPress, just those files, so I went with a subdirectory. It installed SUPER FAST then. Now I have a Drupal 11 site inside my WordPress site.

Not sure we can suggest Bluehost by any means (even once/if Softaculous offers Drupal CMS too). That said, it did install Drupal 11 in a matter of seconds, so Softaculous has it figured out very well apparently :)

catch’s picture

It offered to replace them or for me to pick a subdirectory. It would not replace the whole of WordPress, just those files, so I went with a subdirectory. It installed SUPER FAST then. Now I have a Drupal 11 site inside my WordPress site.

This is impressive and of all the things I could have predicted, would never have come up with it.

pameeela’s picture

I tried out A2Hosting, but my conclusion is that setting up manually is not really worth documenting, considering how complicated it is compared with the Softaculous installer for Drupal. We should try to get Drupal CMS added as an option to that instead.

FWIW I got Project Browser working using the default Drupal 11 install and documented this in the guide.

If we are able to get Drupal CMS as an option, much of this setup would be automatic and if we could even get the Composer path set by the installer there would be no manual steps required to use it.

nod_’s picture

is it possible to check the availability of nodejs on the shared hosting while looking at all this? just a yes/no would be great, a version would be even better

dunx’s picture

Even AWS Lightsail is talking about Drupal 7 and 8 installation via Bitnami :|

https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-...
https://docs.bitnami.com/aws/apps/drupal/configuration/install-plugins/

If Drupal CMS is going to succeed, it needs to be as easily installed as Wordpress on "cheap" hosting.

This feels like a major blocker to uptake for me right now. Sure, I could probably get it working somewhere cheap as others already have, but we're Drupal experts. What about these marketers we're talking about?

I appreciate I'm not offering answers or solutions.

hestenet’s picture

Title: Test (and then possibly document) installing Drupal CMS on shared hosting » [META] Test (and then possibly document) installing Drupal CMS on shared hosting
Category: Task » Plan
Related issues: +#3526522: [META] Integrate site templates into Drupal CMS

Adjusting the issue title here to reflect that it is becoming the 'meta' issue for the shared hosting question in general - and start collecting related issues.

hestenet’s picture

pameeela’s picture

Status: Active » Fixed

We did a pretty comprehensive assessment of this. The short answer is that Softaculous includes Drupal CMS, so any hosting provider that uses it will offer Drupal CMS. Manual setup of Drupal on shared hosting is a non-starter.

Separately though, the experience of using shared hosting is pretty awful, and we hit many blockers with using Drupal CMS as intended (i.e. using package manager at all). Our conclusion is that shared hosting is not a pathway that we want to focus on in the short term. We don't have any leverage at all as far as working directly with the providers to make it easier (though we did reach out to many of them to no avail) and given that it's awful anyway this was chewing up a lot of time and energy that could be spent elsewhere.

We may come back to it in the future but I think it's more likely a case of, if the demand grows at the lower end then the hosting providers will follow.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.