Install and update farmOS on shared hosting

Constraints in shared hosting:
a). Infrastructure:
1. Can switch between available php versions(most famous versons available)
2. Mostly mariadb or mysql will be there
3. Mostly apache2(webserver) will be there.
4. ssh and ftp will be there
5. Terminal via web (some time not)
6. Linux OS
7. Cpanel
b). Access permission:
1. Not be a super user.
2. Only we can write on public_htm folder (or web directoey)
3. Have not access for apache configuration (apache2.conf or httpd.conf).
4. Can be install ssl via cpanel.
5. In the Most of the hosting we can create database via cpanel only. User can’t adjust the chareset and collate during database creation.
6. User can’t chage main domain DocumentRoot on apache or cpanel.
7. Some times php extension can install or enable via cpanel.

warning: i think farmos not officially support for shared hosting it well tested on Docker.

2 Likes

Constraints in Drupal: official requirements
First refer that official requirement page.

  1. For install and update farmOS we need composer command should be executable.
  2. User can run drush in drush/drush folder (Not possible to set system environment variable.)
  3. if we need more translation we should go for utf8mb4 based collation.
  4. farmOS Documentroot must be /serverdirectories/farmos/web/ in apache.

aware: This is based on my current knowledge.

2 Likes

To install and update farmOS:(via composer)

  1. Install required php extensions. (sodium extension not listed).
  2. If you said private folder to with in site folder it make better.

All other details in https://farmos.org/hosting/composer/ this page.

  1. Most case some other services routed or redirected via main domain alias like example.com/cpanel or example.com/mail. so, You may set farmOS as a alias of main domain like example.com/farm .
  2. But you need to write apache rewrite condition on public_html folder for main domain. if it’s subdomain you can set /serverdirectories/farmos/web/ as Documentroot via Cpanel.
#/public_html/.htaccess file
RewriteEngine On

# Allow access to existing files and directories in the root directory
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# Redirect all other requests to farmOS/web
RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/farmOS/web/
RewriteRule ^(.*)$ /farmOS/web/$1 [L]
  1. open url in browser to set final settings and install require farmOS official modules.
  2. Before updating take backup code and db. Also check if any new php extension need or not. Then proceed update descriped by farmOS guide.

aware: This is based on my current knowledge.

2 Likes

To install and update farmOS:(via packaged release : officially deprecate in farmOS version 4)

  1. Download and extract farmos pacage from https://github.com/farmOS/farmOS/releases this page.
  2. Set private folder within site directory in farmos/web/sites/default/setting.php file. (user may be copy farmos/web/sites/default/default.setting.php to farmos/web/sites/default/setting.php)
  3. Set apache configuration and open url in browser to set final settings and install require farmOS official modules.
    Update:
  4. Before updating take backup code and db. Also check if any new php extension need or not.
  5. Then download and extract new package from github page.
  6. After replace new site folder to older (using farmOS) folder.
  7. Run drush cr command.
  8. open http://domain/update.php in browser to complete update.

aware: This is based on my current knowledge.

2 Likes