Nethserver / Wordpress / Vhost / Php74 or higher

NethServer 7.9.2009
Wordpress / Vhost / PhpX.X

Hello everyone. I hope everyone is doing okay. So I have a friend who has been wanting to start his own small company. I decided to help him bring up a Nethserver to run his Website / Mail and some other items that are made possible by Nethserver. We have decided to stick with NethServer 7.9 for the time being as we want certain things in NS8 to mature before we try to use it for what we are using it for.

In saying that we have been challenged with getting Wordpress using some plugins because he is only running PHP7.3. It tells us that we need to upgrade PHP to PHP7.4 and above. Really all we want it to upgrade PHP to PHP7.4 at the very least, or upgrade it to 8.0 / 8.1 / 8.2 / or 8.3 if possible.

This will allow us to move forward with him building his website to his spec.

I have tried to look through the forums to find upgrading PHP7.3 to PHP7.4 and above. I have found many articles for challenges other people have, but not just install PHP and activating the new version of PHP for Wordpress to use.

I found the following -

PHP by software collections (*it says This module won’t be updated the official way now is cockpit with the virtualhosts panel )

https://wiki.nethserver.org/doku.php?id=php-scl

[PHP 7.4 EOL on 28 Nov 2022]

[Php-fpm in the default directory]

there are many more to list, on the subject, but you get the idea.

Since I followed the following instructions for Wordpress -


Wordpress (blog)

https://wiki.nethserver.org/doku.php?id=wordpress


So when I finalized this and got Wordpress running I then noticed I needed to update PHP to at least PHP7.4 to allow newer plugins to stay secure and have the plugins work.

When trying to do so I found out that the official way to update it now is in cockpit through the virtualhosts panel. When using the steps in the Nethserver Wiki for Wordpress (blog), it doesn’t seem to be setup in a vhost.

Is there a way to transfer the existing Wordpress install to a newly created vhost or adjust a newly created vhost to point to Wordpress so I can use/change the PHP version in vhost, or do I have to start from scratch and make a vhost first and then load Wordpress into it somehow?

Thanks,
-SF-

If you want to move a vhost it can been done manually, create a vhost inside cockpit, set the parameters you need, specially php and cp from the old ibays to the cockpit vhost

1 Like

Is there a post or a wiki that goes in to more detail on how to do this that you can share with me specifically? I did some searching for the current location of the Wordpress, but I am uncertain of where Wordpress installed to at the moment. I looked under /var/www/html/ and /var/lib/nethserver/vhost/ but the Wordpress install doesn’t seem to be there.

Thoughts?

/var/lib/nethserver/ibays ?

So much ns8 i forget for sur ns7 :slight_smile:

Also I am on holidays with only a cell phone

1 Like

Oops. Sorry @stephdl . I didn’t realize you were on vacation. My bad. Get back to relaxing and family. Don’t worry about this. I do appreciate you chiming in. I will look into what you relayed to me. Thanks again.

from nethserver-wordpress module? /etc/wordpress ?

2 Likes

Thank @dnutan I completely missed the contrib I did

I provided php73 it seems maybe time to make an upgrade

What rpm you have installed

rpm -qa | grep -i wordpress

1 Like

@dnutan you asked

from nethserver-wordpress module? /etc/wordpress ?

[root@phatomgrid wordpress]# pwd
/etc/wordpress
[root@phatomgrid wordpress]# ls
wp-config.php

@stephdl asked
What rpm you have installed

rpm -qa | grep -i wordpress

[root@phatomgrid wordpress]# rpm -qa | grep -i wordpress
nethserver-wordpress-AutoUpdater-1.1.11-2.ns7.sdl.noarch
wordpress-AutoUpdater-5.2.3-1.ns7.sdl.noarch

Let me get you more info -

[root@xxxxxx ~]# config show wordpress
wordpress=configuration
DomainName=xxxxxxxx.com
MaxExecutionTime=60
MemoryLimit=128M
PostMaxSize=32M
URL=https://xxxxxxxx.com
UploadMaxSize=8M
WebFilesMod=enabled
access=public
status=enabled

[root@phatomgrid ~]# ls -ls /opt/remi
total 0
0 dr-xr-xr-x 3 root root 32 Feb 13 01:21 php56
0 dr-xr-xr-x 3 root root 32 Feb 13 01:21 php70
0 dr-xr-xr-x 3 root root 32 Feb 13 01:21 php71
0 dr-xr-xr-x 3 root root 32 Feb 13 01:20 php72
0 dr-xr-xr-x 3 root root 32 Feb 13 01:21 php73
0 dr-xr-xr-x 3 root root 32 Feb 13 01:21 php74
0 dr-xr-xr-x. 3 root root 32 Feb 13 01:44 php80
0 dr-xr-xr-x 3 root root 32 Feb 13 01:44 php81

Let me know if there is anything else you need.

/usr/share/wordpress ?

1 Like

I need to release with php81

2 Likes

[root@phatomgrid wordpress]# pwd
/usr/share/wordpress

[root@phatomgrid wordpress]# ls
index.php readme.html wp-activate.php wp-blog-header.php wp-config.php wp-content wp-includes wp-load.php wp-mail.php wp-signup.php xmlrpc.php
license.txt tmp wp-admin wp-comments-post.php wp-config-sample.php wp-cron.php wp-links-opml.php wp-login.php wp-settings.php wp-trackback.php

Well @dnutan you found it. or part of it. LOL Thx!

@stephdl I don’t know if you are still on vacation or not. Just checking. Any fix release on php81?

I appreciate all you do.

Thanks
-SF-

1 Like

Thank for the reminder, will try this weekend. Sorry it is a community module of ns7, week is for NS8

Just landed from holidays :slight_smile:

On todo

1 Like

Understand. I still appreciate all you do. Glad you got a breather from all the work. As stated somewhere above It’s always good to get away and have sometime to reflect, relax and family time. Also glad to have you back.

-SF-

1 Like

monday has been horrible, I will never take holiday again :stuck_out_tongue:

1 Like

Yeah… I have taken my share of vacations and come back to a raging river back at work. I know the feeling. At that point I am thinking… Man! I could of stayed two more days… LOL

1 Like

I think I can easily bring this, php80, will test it

2 Likes

yum install https://mirror.de-labrusse.fr/NethDev/wordpress/nethserver-wordpress-AutoUpdater-1.1.12-2.ns7.sdl.noarch.rpm https://mirror.de-labrusse.fr/NethDev/wordpress/wordpress-AutoUpdater-6.4.3-1.ns7.sdl.noarch.rpm

Can you test, it will upgrade worpdress to 6.4.3 with php81, the database won’t change

do a snapshot of your server or test it on another server, on my test it works and no errors but who knows

I needed to upgrade the wordpress because the old version was not compatible with php81

2 Likes

Hello sir! Sorry for not getting back with you on Sunday night or Monday. I got caught up in work.

I can verify on my side that after running the following -

yum install https://mirror.de-labrusse.fr/NethDev/wordpress/nethserver-wordpress-AutoUpdater-1.1.12-2.ns7.sdl.noarch.rpm https://mirror.de-labrusse.fr/NethDev/wordpress/wordpress-AutoUpdater-6.4.3-1.ns7.sdl.noarch.rpm

that it did indeed upgrade properly to PHP 8.1.

Thank you for updating the packages and getting this ready to test. This is fantastic and I really appreciate you taking the time out to make it happen.

Thanks again,
-SF-

released

3 Likes