huskybob
(Bob)
February 25, 2020, 6:05am
1
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
stephdl
(Stéphane de Labrusse)
February 25, 2020, 6:14am
2
Could you explain what you want to do, your goal and why the wordpress-autoupdate doesnt satisfy you
GG_jr
(Gabriel GHEORGHIU)
February 25, 2020, 6:37am
3
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
huskybob
(Bob)
February 25, 2020, 8:19am
4
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
huskybob
(Bob)
February 25, 2020, 10:20am
6
stephdl
the " rpm -qa | grep wordpress " output is
nethserver-wordpress-1.1.6-1.ns7.sdl.noarch
wordpress-5.1.4-1.el7.noarch
stephdl
(Stéphane de Labrusse)
February 25, 2020, 12:29pm
7
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
huskybob
(Bob)
February 26, 2020, 5:48am
8
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?
stephdl
(Stéphane de Labrusse)
February 26, 2020, 6:34am
9
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
huskybob
(Bob)
February 26, 2020, 6:51am
10
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?
stephdl
(Stéphane de Labrusse)
February 26, 2020, 7:16am
11
Use the dns server of your router
michelandre
(Michel-André)
February 26, 2020, 1:46pm
12
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é
huskybob
(Bob)
February 26, 2020, 1:50pm
13
Stéphane and Michel-André, thank you for your support
doh
michelandre
(Michel-André)
February 26, 2020, 1:59pm
14
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é
huskybob
(Bob)
February 26, 2020, 2:08pm
15
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
michelandre
(Michel-André)
February 26, 2020, 3:52pm
16
Hi Bob,
Clear the browser history.
Execute a command from the Window$ workstation and execute:
ipconfig /flushdns
Try again.
Michel-André
PS: