Wordpress with php74 SCL

guys please can you help the Nethserver 7 noob

i have installed workdpress then after installation i installed " PHP by software collections "

my " Php74 SCL Version " is set to PHP 74

how do i upgrade wordpress as i keep getting the following within Wordpress
" You cannot update because WordPress 5.3.2 requires PHP version 5.6.20 or higher. You are running version 5.4.16. "

how do i create a " custom-template " for wordpress to use php74 on my Nethserver 7?

any help greatly appreciated :smiley:

Could you explain what you want to do, your goal and why the wordpress-autoupdate doesnt satisfy you

AFAIK, " PHP by software collections " works only with “Virtual hosts”.
So, if you don’t installed WP on a virtual host, you can’t set PHP version.
I think you have installed WP “by default” so, the PHP version is the Neth Server version.

PS
My fault!
You can set PHP version for the root folder (/var/www/html) from Configuration -> Php settings -> PHP Apache version Tab (if you have installed WP in /var/www/html).

1 Like

thanks you your help, much appreciated

still not able to upgrade wordpress or use PHP 74

i have install a generic wordpress installation as per Module: https://wiki.nethserver.org/doku.php?id=wordpress

there is NO folder " wordpress " in " /var/www/html "

i have NOT created a virtual host

i simply want to Upgrade Wordpress and Use PHP 74 as the default php version for my Nethserver including all and any systems that i install

do i need to create a virtual host?

sorry for the noob questions

rpm -qa | grep wordpress

What is the output

stephdl

the " rpm -qa | grep wordpress " output is

  • nethserver-wordpress-1.1.6-1.ns7.sdl.noarch
    wordpress-5.1.4-1.el7.noarch

So you want to use php 74 because of the warning you see in wordpress 5.1.x from epel

Did I understand well ?

If yes, It doesn’t worth it because you will stay with an old version of wordpress

So two valid solutions

Create a virtualhosts with the php version you need and install manually wordpress inside from an archive

Install a custom version of wordpress I name autoupdater, it uses php72 and you can use the internal update system of wordpress https://wiki.nethserver.org/doku.php?id=wordpress#wordpress-autoupdater

Stéphane thank you for your support

so just to make sure

i create a virtual host eg: in the nethserver 7 menu " Management > Virtual hosts > Create NEW "

General Tab
Name = wordpress2
Description = My 2nd Wordpress Site
Virtual host names (FQDN) = wordpress2

PHP Software collection:

PHP Settings:

I have downloaded Wordpress 5.3.2 and have copied all the wordpress files in " /var/lib/nethserver/vhost/wordpress2 "

when i try to run wordpress at " http://mynethserverip/wordpress2/ " i get an " NOT FOUND " error in my browser.

any ideas what i am doing wrong?

It is a vhost, so the url in your browser is http://wordpress2

So now you need a dns record A (redirection) with a real domain name pointed to the IP of your server

Stéphane thank you for the feedback

i am running the nethserver on a local lan and do not have a domain name for the ip of my server.

i could use dyndns?

i just need the latest wordpress to work using php 74

any other ideas?

Use the dns server of your router

Hi Bob,

Put it in your hosts file.
On a Linux workstation, it will be /etc/hosts
On Window$ workstation, it will be in: C:\Windows\System32\drivers\etc\hosts.

Example:
10.10.10.10 mydomain.org

To access it: http://mydomain.org/wordpress2

Michel-André

Stéphane and Michel-André, thank you for your support

doh :flushed:

Hi again Bob,

If you want to be able to update Wordpress without problem (no “/” at the end of command):

chown -R apache:apache /var/lib/nethserver/vhost/wordpress2

For more security you can remove all the rights from “other”:

chmod -R o-rwx /var/lib/nethserver/vhost/wordpress2/*

Michel-André

Michel-André

On my Nethserver 7 menu > Configuration > Accounts provider = mydoman.org

My Nethserver IP: 10.0.10.10
edit /etc/hosts

10.0.10.10 mydomain.org

To access it: http://mydomain.org/wordpress2

does not work

i can ping mydomain.org

help :roll_eyes:

Hi Bob,

Clear the browser history.

Execute a command from the Window$ workstation and execute:

ipconfig /flushdns

Try again.

Michel-André

PS: