Skip to content

installing flarum with plesk

Solved Configure
78 2 30.3k 1
  • @Hari Flarum will 100% work on Plesk, but as I alluded to in a previous thread, it’s not a simple exercise. Installing Flarum using Pocket Hold isn’t necessary as you should be able to complete the entire installation process using SSH without issue.

    Plesk will use Apache and also leverage NGINX as a reverse proxy. For some time, I ran a Flarum installation using Plesk, but it’s very limiting in the sense that you have very little control over NGINX itself.

    @phenomlab I completely agree, as i can see how complicated it is. i just want to test, explore and learn

    it’s not detecting flarum i need to include flarum path, i did not understand earlier suggestions at the same time bit confused too, could you rephrase and tell me where can i go and do changes?

  • now i understood, the great plesk index.html file not letting to load the flarum after deleting it flarum got loaded without doing any Nginx or apache settings

  • Hariundefined Hari has marked this topic as solved on
  • Hariundefined Hari has marked this topic as unsolved on
  • finally got it running but i am getting these errors how to fix them?

    root@amazing-hellman:/var/www/vhosts/test.tk/httpdocs# php flarum info
    PHP Fatal error:  Uncaught PDOException: could not find driver in /var/www/vhosts/test.tk/httpdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40
    Stack trace:
    #0 /var/www/vhosts/test.tk/httpdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(40): PDO->__construct()
    #1 /var/www/vhosts/test.tk/httpdocs/vendor/illuminate/database/Connectors/Connector.php(67): Doctrine\DBAL\Driver\PDOConnection->__construct()
    #2 /var/www/vhosts/test.tk/httpdocs/vendor/illuminate/database/Connectors/Connector.php(46): Illuminate\Database\Connectors\Connector->createPdoConnection()
    #3 /var/www/vhosts/test.tk/httpdocs/vendor/illuminate/database/Connectors/MySqlConnector.php(24): Illuminate\Database\Connectors\Connector->createConnection()
    #4 /var/www/vhosts/test.tk/httpdocs/vendor/illuminate/database/Connectors/ConnectionFactory.php(184): Illuminate\Database\Connectors\MySqlConnector->connect()
    #5 [internal function]: Illuminate\Database\Connectors\ConnectionFactory->Illuminate\Database\Connector in /var/www/vhosts/test.tk/httpdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php on line 18
    root@amazing-hellman:/var/www/vhosts/test.tk/httpdocs# 
    
  • finally got it running but i am getting these errors how to fix them?

    root@amazing-hellman:/var/www/vhosts/test.tk/httpdocs# php flarum info
    PHP Fatal error:  Uncaught PDOException: could not find driver in /var/www/vhosts/test.tk/httpdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40
    Stack trace:
    #0 /var/www/vhosts/test.tk/httpdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(40): PDO->__construct()
    #1 /var/www/vhosts/test.tk/httpdocs/vendor/illuminate/database/Connectors/Connector.php(67): Doctrine\DBAL\Driver\PDOConnection->__construct()
    #2 /var/www/vhosts/test.tk/httpdocs/vendor/illuminate/database/Connectors/Connector.php(46): Illuminate\Database\Connectors\Connector->createPdoConnection()
    #3 /var/www/vhosts/test.tk/httpdocs/vendor/illuminate/database/Connectors/MySqlConnector.php(24): Illuminate\Database\Connectors\Connector->createConnection()
    #4 /var/www/vhosts/test.tk/httpdocs/vendor/illuminate/database/Connectors/ConnectionFactory.php(184): Illuminate\Database\Connectors\MySqlConnector->connect()
    #5 [internal function]: Illuminate\Database\Connectors\ConnectionFactory->Illuminate\Database\Connector in /var/www/vhosts/test.tk/httpdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php on line 18
    root@amazing-hellman:/var/www/vhosts/test.tk/httpdocs# 
    

    @Hari That looks like the php-mysql extension is not installed, or not loaded for the PHP version you are using.

  • i want to learn these things

    • change PHP version to 8 at the server level and also for my domain in Plesk using SSH

    • instead of maria DB i want to use MySQL as default, how can i do that? is it really possible? without a docker or any other things (since i am getting those SQL errors as shown in the earlier reply want to switch to MySQL from MariaDB)

    • update composer to v2 for my domain via SSH.

    @phenomlab said in installing flarum with plesk:

    @Hari Flarum will 100% work on Plesk, but as I alluded to in a previous thread, it’s not a simple exercise. Installing Flarum using Pocket Hold isn’t necessary as you should be able to complete the entire installation process using SSH without issue.

    i don’t know the reason but i am unable to install any extensions or flarum using SSH that is the reason i had to use pocket hold

  • Hariundefined Hari has marked this topic as solved on
  • i want to learn these things

    • change PHP version to 8 at the server level and also for my domain in Plesk using SSH

    • instead of maria DB i want to use MySQL as default, how can i do that? is it really possible? without a docker or any other things (since i am getting those SQL errors as shown in the earlier reply want to switch to MySQL from MariaDB)

    • update composer to v2 for my domain via SSH.

    @phenomlab said in installing flarum with plesk:

    @Hari Flarum will 100% work on Plesk, but as I alluded to in a previous thread, it’s not a simple exercise. Installing Flarum using Pocket Hold isn’t necessary as you should be able to complete the entire installation process using SSH without issue.

    i don’t know the reason but i am unable to install any extensions or flarum using SSH that is the reason i had to use pocket hold

    @Hari My responses below

    change PHP version to 8 at the server level and also for my domain in Plesk using SSH

    PHP 8.x has been available in Plesk since October 2021. There’s no need to change this using SSH, and it’s actually not recommended. The entire point of Plesk is to manage this using the portal - see below

    https://support.plesk.com/hc/en-us/articles/115000769793

    instead of maria DB i want to use MySQL as default, how can i do that? is it really possible? without a docker or any other things (since i am getting those SQL errors as shown in the earlier reply want to switch to MySQL from MariaDB)

    Possible, yes - although it’s usually the other way round in the sense that people want to replace MySQL with MariaDB

    https://www.plesk.com/blog/product-technology/mysql-vs-mariadb/

    update composer to v2 for my domain via SSH.

    You should take the same route as is advertised here

    https://getcomposer.org/download/

  • @Hari My responses below

    change PHP version to 8 at the server level and also for my domain in Plesk using SSH

    PHP 8.x has been available in Plesk since October 2021. There’s no need to change this using SSH, and it’s actually not recommended. The entire point of Plesk is to manage this using the portal - see below

    https://support.plesk.com/hc/en-us/articles/115000769793

    instead of maria DB i want to use MySQL as default, how can i do that? is it really possible? without a docker or any other things (since i am getting those SQL errors as shown in the earlier reply want to switch to MySQL from MariaDB)

    Possible, yes - although it’s usually the other way round in the sense that people want to replace MySQL with MariaDB

    https://www.plesk.com/blog/product-technology/mysql-vs-mariadb/

    update composer to v2 for my domain via SSH.

    You should take the same route as is advertised here

    https://getcomposer.org/download/

    @phenomlab oh i see in that case i think my old backup is causing the issues regarding MySQL and PHP versions. i will try fresh installation now.

  • @phenomlab oh i see in that case i think my old backup is causing the issues regarding MySQL and PHP versions. i will try fresh installation now.

    @Hari Ok. Let me know.

  • @Hari Ok. Let me know.

    @phenomlab

    i have installed and set my project settings to PHP 8 but CLI is not updating to 8.0

    f0ec177a-355a-4321-9095-1e8a5889dc31-image.png

    should i try this?

    https://talk.plesk.com/threads/set-default-php-version-for-command-line.345940/

    407d76d6-2f86-4303-a2f9-0e9fdbc16b4c-image.png

  • @phenomlab

    i have installed and set my project settings to PHP 8 but CLI is not updating to 8.0

    f0ec177a-355a-4321-9095-1e8a5889dc31-image.png

    should i try this?

    https://talk.plesk.com/threads/set-default-php-version-for-command-line.345940/

    407d76d6-2f86-4303-a2f9-0e9fdbc16b4c-image.png

    @Hari What version of Plesk do you have ? You should be able to install this using the links I posted earlier ?

  • @Hari What version of Plesk do you have ? You should be able to install this using the links I posted earlier ?

    @phenomlab

    Plesk Obsidian Version 18.0.41

    acfd0388-0760-4f77-826d-38d063b053ac-image.png

    domain settings

    596f60af-adaa-4e8a-bf52-45c6608812fa-image.png

  • @phenomlab

    Plesk Obsidian Version 18.0.41

    acfd0388-0760-4f77-826d-38d063b053ac-image.png

    domain settings

    596f60af-adaa-4e8a-bf52-45c6608812fa-image.png

    @Hari What’s the output of php -v from CLI ?

  • @Hari What’s the output of php -v from CLI ?

    @phenomlab

    11bfa541-1459-4df4-ba9d-3e44dacef7b2-image.png

    i just sent logins, please teach me what changes i need to make i really want to learn this setup process … i want to do a youtube video on this too 😄

  • @phenomlab

    11bfa541-1459-4df4-ba9d-3e44dacef7b2-image.png

    i just sent logins, please teach me what changes i need to make i really want to learn this setup process … i want to do a youtube video on this too 😄

    @Hari Looks like the environment variable is not set.

    What is the output of

    locate php and whereis php ?

  • @Hari Looks like the environment variable is not set.

    What is the output of

    locate php and whereis php ?

    @phenomlab

    28f85e13-05c1-47fd-a458-d696cd71264d-image.png

    5c7af3dc-bb2c-4005-9cd0-1b7703a1518a-image.png

    should i goto the root and run these commands again?

  • @phenomlab

    28f85e13-05c1-47fd-a458-d696cd71264d-image.png

    5c7af3dc-bb2c-4005-9cd0-1b7703a1518a-image.png

    should i goto the root and run these commands again?

    @Hari No. Plesk typically installs PHP in /opt/plesk/php/7.4/bin so what is the output of /opt/plesk/php/7.4/bin/php -v ?

    Should be

    PHP 7.4.28 (cli) (built: Feb 18 2022 07:57:20) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
        with the ionCube PHP Loader + ionCube24 v11.0.1, Copyright (c) 2002-2022, by ionCube Ltd.
        with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies
    

    Therefore, PHP 8 should be in /opt/plesk/php/8.0/bin, so you should also get output from /opt/plesk/php/8.0/bin/php -v as below

    PHP 8.0.16 (cli) (built: Feb 18 2022 07:57:20) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v4.0.16, Copyright (c) Zend Technologies
        with Zend OPcache v8.0.16, Copyright (c), by Zend Technologies
    

    This means that because your environment variable is missing, you have to specify the full path to PHP 8, so instead of just php, you need /opt/plesk/php/8.0/bin/php

    Welcome to Plesk 😕

  • @Hari No. Plesk typically installs PHP in /opt/plesk/php/7.4/bin so what is the output of /opt/plesk/php/7.4/bin/php -v ?

    Should be

    PHP 7.4.28 (cli) (built: Feb 18 2022 07:57:20) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
        with the ionCube PHP Loader + ionCube24 v11.0.1, Copyright (c) 2002-2022, by ionCube Ltd.
        with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies
    

    Therefore, PHP 8 should be in /opt/plesk/php/8.0/bin, so you should also get output from /opt/plesk/php/8.0/bin/php -v as below

    PHP 8.0.16 (cli) (built: Feb 18 2022 07:57:20) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v4.0.16, Copyright (c) Zend Technologies
        with Zend OPcache v8.0.16, Copyright (c), by Zend Technologies
    

    This means that because your environment variable is missing, you have to specify the full path to PHP 8, so instead of just php, you need /opt/plesk/php/8.0/bin/php

    Welcome to Plesk 😕

  • @Hari sorry - that should be /opt/plesk/php/8.0/bin/php. Previous post corrected.

  • @Hari sorry - that should be /opt/plesk/php/8.0/bin/php. Previous post corrected.

    @phenomlab i installed Plesk directly from DO app area… it’s free up to 2-3 domains.

    after running opt command the screen got stuck

  • @phenomlab i installed Plesk directly from DO app area… it’s free up to 2-3 domains.

    after running opt command the screen got stuck

    @Hari That’s expected because you are now running PHP as a daemon 🙂 Kill it by pressing CTRL + C (sometimes CTRL + Z or CTRL + X), then issue the correct command of /opt/plesk/php/8.0/bin/php -v which should spit out the version used in CLI.


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • 1 Votes
    2 Posts
    1k Views
    @Hari I think you’re referring to this https://sudonix.com/topic/170/creating-posts-from-rss-feeds-in-flarum However, this code was never designed to work with WordPress, but you could leverage the WP-CLI to do something similar without too much effort.
  • migrating from cloudways to plesk

    Solved Configure plesk cloudways
    25
    8 Votes
    25 Posts
    8k Views
    @Hari raise a new topic for the MIME question…
  • Flarum SEO is worst and i still want to use it 😭

    General flarum
    15
    6 Votes
    15 Posts
    4k Views
    @Hari said in Flarum SEO is worst and i still want to use it : Flarum is coded in such a way where it tells spiders not to crawl any internal links by adding nofollow tag. How stupid this is Yes, I agree this doesn’t make any sense. If you compare to WordPress, then (via a plugin of course) you can set the attribute as you wish. It doesn’t make any sense to take a blanket approach. I guess I unerstand why they are doing this, but it’s not an optimum SEO methodology. @Hari said in Flarum SEO is worst and i still want to use it : For few minutes i thought i should register a domain called flarumSEOsucks.com They’d probably sue you for using the Flarum name in a URL
  • Issues getting Flarum to work on new host

    Solved Configure virtualmin
    65
    14 Votes
    65 Posts
    24k Views
    @crazycells huh. Thanks. Will need to check that as well.
  • Flarum

    General flarum
    4
    0 Votes
    4 Posts
    1k Views
    @jac said in Flarum: @phenomlab said in Flarum: @jac yes, but they are lacking severely in the sense that they still do not have a functional GDPR extension. In addition, Flarum uses PHP as it’s backend infrastructure meaning it’s going to be so much slower than NodeBB will ever be. Absolutely, I hope Node up their game . Certainly plugin wise anyway
  • Blomstra Realtime issues on ubuntu server

    Solved Linux
    26
    1 Votes
    26 Posts
    8k Views
    Just checked this thread on Discuss. It’s effectively not stable yet. My suggestion would be to use kyrne/websocket
  • CSS Help on my Flarum

    Solved Customisation
    5
    2
    2 Votes
    5 Posts
    2k Views
    @mike-jones Yes, you’ll typically see this type of behaviour if there is another style that has higher priority in the sense that yours will be overridden. Using !important will override the higher preference, but should be used sparingly rather than everywhere.
  • help me configuring cron job for fof/sitemap - flarum

    Solved Configure
    36
    18 Votes
    36 Posts
    10k Views
    you are too fast