Forums

Resolved
-2 votes
We see a lot of web-based applications getting deployed on ClearOS, and we have decided to take the plunge! WordPress is now available for technically savvy beta testers. You can install WordPress with the following command.

yum --enablerepo=clearos-updates-testing install app-wordpress


Go to Server->Web->WordPress in the menu to complete the WordPress setup.

If you see a "not found" error when clicking on the database link in the WordPress app, restart the webconfig service:

service webconfig restart
Thursday, February 20 2014, 05:15 PM
Share this post:
Responses (21)
  • Accepted Answer

    Thursday, February 20 2014, 08:27 PM - #Permalink
    Resolved
    0 votes
    Peter,

    Tried the app and installing was succesfull, but my wordpress is not worling any more.
    I'd already installed a wordpress site on my apache (/var/www/html) and installed the app.

    When i go to my page is get the following message :

    Can’t select database
    We were able to connect to the database server (which means your username and password is okay) but not able to select the wordpress database.

    Are you sure it exists?
    Does the user wordpress have permission to use the wordpress database?
    On some systems the name of your database is prefixed with your username, so it would be like username_wordpress. Could that be the problem?
    If you don't know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.


    the wp-config.php file is unchanged, but the page is not running anymore.

    any suggestions ??
    The reply is currently minimized Show
  • Accepted Answer

    Friday, February 21 2014, 03:17 PM - #Permalink
    Resolved
    0 votes
    Hi Patrick,

    It looks like the two installs are clashing. That's a bit surprising given that the ClearOS implementation uses the internal system database (not the primary MySQL server) and lives in a different directory (/var/clearos/wordpress). If you don't mind me poking around your system, please feel free to submit the credentials to your ClearOS box here: https://secure.clearcenter.com/portal/system_password.jsp
    The reply is currently minimized Show
  • Accepted Answer

    Friday, February 21 2014, 06:03 PM - #Permalink
    Resolved
    0 votes
    Hi Peter,

    I've got it working.

    Becasue it was working i removed the app. During removing i came up with the bright idea that the config files are not correct.
    After looking in the directory /var/clearos/wordpress/webroot/live and edit the file wp-config.php with my mysql settings it started up and my website was back.

    The only thing is that through the app, the root directory is /wordpress and i like to have my default website in the root without a subdirectory.

    The submittion has been done.
    Feel free to poke ! and let me know.
    The reply is currently minimized Show
  • Accepted Answer

    Dan
    Dan
    Offline
    Friday, February 21 2014, 09:48 PM - #Permalink
    Resolved
    0 votes
    Got a similar result.

    Install went fine on 6.5 Community, Wizard failed. Have never started MySQL admin before.

    >Overview
    >Home Page http://10.10.10.1/wordpress
    >Administrator Login https://10.10.10.1/wordpress/wp-admin
    >Database Management Login

    Home Page -> Results in "Error establishing a database connection"
    Admin Login -> Results in "Can’t select database
    We were able to connect to the database server (which means your username and password is okay) but not able to select the wordpress database.

    Are you sure it exists?
    Does the user wordpress have permission to use the wordpress database?
    On some systems the name of your database is prefixed with your username, so it would be like username_wordpress. Could that be the problem?
    If you don't know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums."
    Database Management Login -> Results in 3 second pause and then repaints https://10.10.10.1:81/app/wordpress page.

    BTW - Can't login to phpMyAdmin using root and rootpassword
    The reply is currently minimized Show
  • Accepted Answer

    anwoke8204
    anwoke8204
    Offline
    Monday, February 24 2014, 09:10 AM - #Permalink
    Resolved
    0 votes
    does this install to a directory of your choosing, or does it have a fixed location? I want to test it out, but not if its going to screw up my currently installed wordpress setup
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 25 2014, 03:52 PM - #Permalink
    Resolved
    0 votes
    Thanks for the feedback. I'll try to duplicate the issue.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, July 19 2014, 01:50 PM - #Permalink
    Resolved
    0 votes
    Peter,

    Is there a way to change the install location of the webroot? I would like my wordpress to install at the base of the FQDN.... /var/www/html

    Right now its at http://FQDN/wordpress

    Thanks!

    Keith
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, July 31 2014, 06:49 PM - #Permalink
    Resolved
    0 votes
    Keith Osburn wrote:
    Is there a way to change the install location of the webroot? I would like my wordpress to install at the base of the FQDN.... /var/www/html

    Sorry for the delay - I was on holiday for most of the last couple of weeks :-)

    You can access WordPress via a hostname (e.g. wordpress.example.org) or a folder name. It would be nice to have a way to make it the default web site though (e.g. www.example.org). We're hoping to get that done before the final release.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, January 27 2015, 04:51 PM - #Permalink
    Resolved
    0 votes
    Very nice job Peter
    .
    I did an install of the WordPress App and all went really well. I did have a little glitch when I attempted to configure the alias with a wild card '*.example.com', getting an invalid DNS name as a message. Changed the WordPress folder location then it accepted the wildcard for the alias, that does not make any sense to me, might just be a glitch on my part.

    I like the integration with Flexshare, never had a chance to use Flexshare before that is a cool service. I also like the fact that you choose WordPress version 3.8.1, will make the integration of older Themes template easier.

    I do have a few questions:

    Once thing that I did change in the configuration is to move the WordPress to MySQL. But I am attempting to understand why you have a hard coded link to the WordPress System MySQL instance in the WordPress Webconfig page? Also Logged in ? Security ?

    Another question my assumption is that you will leave the Upgrades of WordPress to the Owners of the ClearOS boxes, or did you have other plans? Why I ask is WordPress can be upgraded from its admin users, would not be cool if CLearOS clobbered an upgrade made by the admin of WordPress

    I am curious on how you are going to implement the WordPress to be accessible by the root location of the Web Server in the Flexshare context, without breaking Flexshare. In theory the concept should be able to be implemented by any Flexshare? For now I am just thinking of implementing a .access redirect directive to not break the functionality of Flexshare. Any other suggestions?

    Thank You Peter well done
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, February 19 2015, 01:16 AM - #Permalink
    Resolved
    0 votes
    I installed wordpress, initialized it and updated it. Now all of my databases are showing a red circle with exclamation point on them. Its not telling me if or what the error is.
    I can log into the main and system sso but not the system one. Not sure if your supposed to or not. Im not a big mysql database guru.
    I wasnt to keen on the wordpress thingy so I uninstalled it. Red circles showed up before I uninstalled it though


    Is there a newer version out of mysql that can be installed?

    Server version: 5.1.73
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, February 19 2015, 02:13 AM - #Permalink
    Resolved
    0 votes
    Now all of my databases are showing a red circle with exclamation point on them. ... Is there a newer version out of mysql that can be installed?


    Do not forget the Wordpress default install is on the system-mysql which is internally db configured to use by the System services vs the standalone MySQL for the user base. I installed my Wordpress on the latter one, not that it should make any difference.

    Usually both are quite robust are you sure you did not run out of space? Maybe the logs will give you something
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 06 2018, 10:54 PM - #Permalink
    Resolved
    0 votes
    H team,

    Sorry but i'm very confused on how to setup ClearOS, the Web Server App with Flexshare and WP beta app...
    My goal is to have mutiple instances of WP on the same ClearOS VM.
    Default web server stores files in /var/www/html
    Additional web sites are stored in /var/www/virtual
    Flexshare shares are located in /var/flexshare/shares but don't know how to change this default path
    WP beta app creates directories in /var/clearos/wordpress/sites and don't know again how to change this path

    So how to setup configuration in each module to manage multiple instances of WP and publish on the web ?

    What i've done.
    Create a new website (not the default website) stored in /var/www/virtual
    Create a new share with Flexshare stored in /var/flexshare/shares
    Create a new instance of WP with WP beta stored now in /var/clearos/wordpress/sites but how to move the fresh install in the new web site created in step 1 ?

    What is the next step to publish the WP site on the web ?
    Cannot find any tutorial to achieve the correct configuration in the right order...

    For the moment, i decided to not use WP beta and install WP manually in subdirectories inside /var/www/html

    Any help would be greatly appreciated...
    ALl my best
    Like
    1
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, February 08 2018, 09:07 PM - #Permalink
    Resolved
    0 votes
    Just to clear up a little confusion. Web sites are created in /var/www/html and /var/www/virtual as you've seen. At the same time website flexshares are set up under /var/flexshare/shares, but also *at the same time* /var/www/{html|virtual} are bind mounted into /var/flexshare/shares. This means whatever appears to be under website flexshares in /var/flexshare/shares are actually under /var/www/{html|virtual}. Have a look at the output of the "findmnt" command and to see how it is implemented, have a look in /etc/fstab.

    I'm not sure if you should need to play around with settings in /var/clearos/wordpress/sites.

    I can't help any more as I am not a WP user.
    The reply is currently minimized Show
  • Accepted Answer

    gil na
    gil na
    Offline
    Sunday, April 10 2022, 03:58 AM - #Permalink
    Resolved
    0 votes
    Sorry but i'm very confused on how to setup ClearOS, the Web Server App with Flexshare and WP beta app...
    My goal is to have mutiple instances of WP on the same ClearOS VM.
    Default web server stores files in /var/www/html
    Additional web sites are stored in /var/www/virtual
    Flexshare shares are located in /var/flexshare/shares but don't know how to change this default path
    WP beta app creates directories in /var/clearos/wordpress/sites and don't know again how to change this path

    So how to setup configuration in each module to manage multiple instances of WP and publish on the web ?

    What i've done.
    Create a new website (not the default website) stored in /var/www/virtual
    Create a new share with Flexshare stored in /var/flexshare/shares
    Create a new instance of WP with WP beta stored now in /var/clearos/wordpress/sites but how to move the fresh install in the new web site created in step 1 ?

    What is the next step to publish the WP site on the web ?
    Cannot find any tutorial to achieve the correct configuration in the right order...


    also followed

    Nick Howitt

    Just to clear up a little confusion. Web sites are created in /var/www/html and /var/www/virtual as you've seen. At the same time website flexshares are set up under /var/flexshare/shares, but also *at the same time* /var/www/{html|virtual} are bind mounted into /var/flexshare/shares. This means whatever appears to be under website flexshares in /var/flexshare/shares are actually under /var/www/{html|virtual}. Have a look at the output of the "findmnt" command and to see how it is implemented, have a look in /etc/fstab.




    What i end up gettting is

    Your server is running PHP version 5.4.16 but WordPress 5.2.2 requires at least 5.6.20. i take it because its not being published in ether flexshare or wesite

    My wordpress is not running under the sites i set up on ether flexshare or the websever

    any help is much apprecated thank you
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, April 10 2022, 12:55 PM - #Permalink
    Resolved
    0 votes
    @gil na,
    Please can you tidy up your post and put setrions taken from other posts in quotes? It is hard to work out what you want.

    For a couple of workpress issues see https://gitlab.com/clearos/clearfoundation/app-wordpress/-/issues/5 for getting FTP access to your WP site. For different PHP versions, install the PHP Engines app then see https://gitlab.com/clearos/clearfoundation/app-wordpress/-/issues/4 to enable a different PHP version or create a file called /var/clearos/wordpress/sites/.phpenv (note the ".") and in it put 70, 71, 72 or 73 depending on the PHP version you want the site to run.
    The reply is currently minimized Show
  • Accepted Answer

    gil na
    gil na
    Offline
    Sunday, April 10 2022, 10:25 PM - #Permalink
    Resolved
    0 votes
    bit connfused about what im doing to flex-21.conf

    5.in /etc/proftpd.d/flex-21.conf add default access to the CWD command on line 16 then restart proftpd. The underlying program that writes this file should be changed.





    #----------------------------------------------------------------
    # WARNING: This file is automatically created by webconfig.
    #----------------------------------------------------------------

    <VirtualHost x.x.x.x 192.168.3.1 192.168.10.1>
    Port 21
    DefaultRoot /var/flexshare/shares/
    RequireValidShell off
    AuthPam on
    AuthPAMConfig proftpd
    PassivePorts 60000 60999
    CapabilitiesEngine on
    CapabilitiesSet +CAP_CHOWN

    <Limit LOGIN CDUP PWD XPWD LIST PROT PASV>
    AllowAll
    </Limit>
    <Limit ALL>
    DenyAll
    </Limit>

    <IfModule mod_tls.c>
    "flex-21.conf" 168L, 4055C
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 11 2022, 08:17 AM - #Permalink
    Resolved
    0 votes
    Change
    <Limit LOGIN CDUP PWD XPWD LIST PROT PASV>
    to
    <Limit LOGIN CDUP PWD XPWD LIST PROT PASV CWD>
    Also change the underlying app, Flexshare.php line 2762, or you will lose your first edit whenever you make a change to flexshares.
    The reply is currently minimized Show
  • Accepted Answer

    gil na
    gil na
    Offline
    Saturday, April 16 2022, 02:22 AM - #Permalink
    Resolved
    0 votes
    first thank you Nick for all your time

    after step 5 I try to access the wordpress site through wordpress app which before I preformed chmod 0660 /var/clearos/wordpress/sites/ -R I was able to access. I now get forbiden.
    .

    And Im unclear what im doing to app-wordpress.conf

    Alias /wordpress /var/clearos/wordpress/sites

    <Directory /var/clearos/wordpress/sites>
    Require all granted
    </Directory>




    /etc/httpd/conf.d/app-wordpress.conf

    steps


    1.Similar to the Web Server when you enable FTP upload, create a flexshare called sites for FTP only. Select the group as in the Web Server app.
    2.Again like the Web Server app with FTP uploads, bind-mount /var/clearos/wordpress/sites into /var/flexshare/shares/site. From the command line this would be mount --bind /var/clearos/wordpress/sites /var/flexshare/shares/sites but use the methods from the Web Server app as this also writes to /etc/fstab to make the bind permanent.
    3.Change the ownership of everything under /var/clearos/wordpress/sites to apache:allusers. This would need to also be done for every new WP website. You could consider investigating the setgid command, or just change the ownerships every time a new WP website is created.
    4.change permissions to 0660 chmod 0660 /var/clearos/wordpress/sites/ -R. Each new site would need to be created with the same ownership and permissions.
    5.in /etc/proftpd.d/flex-21.conf add default access to the CWD command on line 16 then restart proftpd. The underlying program that writes this file should be changed.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, April 16 2022, 07:59 AM - #Permalink
    Resolved
    0 votes
    In /etc/httpd/conf.d/app-wordpress.conf, add the lines in the directory block like:
    <Directory /var/clearos/wordpress/sites>
    Require all granted
    <FilesMatch \.php$>
    SetHandler "proxy:fcgi://127.0.0.1:9073"
    </FilesMatch>
    </Directory>

    This would give you php 7.3 if you have installed the PHP Engines app and enabled PHP 7.3.

    I am not sure why flexshares are not working. Are you using the correct user? What do you get from:
    ls -l /var/clearos/wordpress/sites/


    In your replies, please start using code blocks where relevant. It is the piece of paper icon with a <> on it.
    The reply is currently minimized Show
  • Accepted Answer

    gil na
    gil na
    Offline
    Sunday, April 24 2022, 01:17 AM - #Permalink
    Resolved
    0 votes
    Once agian thank you Nick for all you do. I have it up and running. i was never able to get it working with
    [chmod 0660 /var/clearos/wordpress/sites/ -R
    . I would end up getting a forbiddin and the app would no longer work.. After install with
    wordpress in the wordpress site. I would install security plugin for file permissions. i have a new problem i can not get SYMLINKS to work as it is outside of the websever app virtual host container. This causes a problem with the wordpress cms permalink settings.

    i have no problems in the main website just in the /var/clearos/wordpress/sites.



    Thank you for any suggestions
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, April 24 2022, 08:02 AM - #Permalink
    Resolved
    0 votes
    I would not use symlinks to link the virtualhost to wordpress. I'd use bind mounts. Have a look in /etc/fstab to see how they are done, but it is also possible to set them up through the Storage Manager app.
    The reply is currently minimized Show
Your Reply