HowTo install Wordpress on NethServer



With e-smith in the mix, I don’t believe I’d ever just restart apache.


So I guess I’m ready to try this… but my question is, will this repository stay up to date with Wordpress?
My other vps wp installs are constantly being updated by Wordpress, never mind the hot mess the plugins are for vulnerabilities, so I definitely don’t want to fall behind on one of the biggest targets on the Internet, well other than Joomla, you should see my ids logs, lol.

(Stéphane de Labrusse) #43

Normally epel tries to be up to date with this rpm, simply update from it. Alternatively I developed for SME Server an option to auto update wordpress with the internal core feature. I didn’t recall if I did it here. In fact nethserver-wordpress was a study case for me to learn how NS works… If my opinion could interest you, I do install my web application manually when I want to fit all my needs.

Any way, I’m looking in this direction to use the root directory for wordpress (it could be reused for dokuwiki and tt-rss) but it is not ready, stay tuned.

(Kristian Reukauff) #44

Is this already working for v7?
In the Software Center I cannot find Wordpress in the NethForge.

(Giacomo Sanchietti) #45

I think nobody tried to port the module. :frowning:

(Alessio Fattorini) #46

Does it work using the virtualhost panel? It would avoid us a lot of effort

(Kristian Reukauff) #47

that was what I am curious about :slight_smile:

(Jonathan Dumont) #48

I look inside your repo and I surprise wordpress isn’t there anymore ?

Would you recommend to install just by adding a VirtualHosts ?

(Stéphane de Labrusse) #49

yes, available for NS6, not (yet) for ns7, I could do it

How did you read my mind :slight_smile:

(Jonathan Dumont) #50

Please Don’t
like with Nextcloud I prefer when I could make some choice
like using it with PHP 7 and Postgresql :wink:
such as with your module PHP SCL and PhpPgAdmin

those 2 modules simply revolutionize all my infras

(Stéphane de Labrusse) #51

Sure, you can do a lot of thing manually, if you have the skill, try to stuck on the forum and help when you have the time.

(Gabriel GHEORGHIU) #52

Hi everybody!

I have installed WordPress following this:
and everything worked well.
I can see the default site (https://IP/wordpress), I can edit the default site, and I have options to update/upgrade the WordPress and Plugins, install new themes, …
So far so good!

I want to use this NS installation to host multiple WordPress sites, visible as follows:
http://domain 1, http://domain 2, …,

To do that, I have created two virtual hosts through Management -> Virtual hosts and two databases through phpMyAdmin ( ).

To have for each domain the own WordPress site, you must copy the entire content of the initial WordPress directory (in my case from /usr/share/wordpress/) in each virtual host site directory (in my case in /var/lib/nethserver/vhost/domain 1/ and /var/lib/nethserver/vhost/domain 2/).

I have done all this using cp command and rsync command (one command for each site) and I have both WordPress sites accessible as http://domain 1 and http://domain 2 and FTP access for each site.

Again, so far so good!
Now, the issue!

On both new sites, I cannot have access to install new themes, to make updates, … (please see the attached screenshots). I don’t have the same privileges as in the default WordPress site.
Where is my mistake?

All I have done was done on a dedicated NS machine (only updated to CentOS 7.4 from Software Center):
System version: NethServer release 7.3.1611 (Final)
Kernel release: 3.10.0-514.el7.x86_64


(Markus Neuberger) #53

Hi @GG_jr,

This is the “old” kernel, but it shouldn’t matter.

Couldn’t test it now, but maybe somethings wrong in config files:

Maybe try “chmod -R 777 ‘/var/lib/nethserver/vhost/domain 1/’” on the new wordpress sites, to see if it’s a rights issue…

Maybe the space in the names of new wordpress sites is the problem.

Just some ideas…

(Gabriel GHEORGHIU) #54

Hi @mrmarkuz ,

Thank you for your attention!

Same situation.

It was just an example (domain 1). The site is (/var/lib/nethserver/vhost/gg/ and /var/lib/nethserver/vhost/gabriels/)

(Gabriel GHEORGHIU) #55

wp-config.php is the same as wp-config-sample.php but with database access credentials.
I don’t think the issue comes from here.

I will try to install a new WordPress following other procedure to see if the issue remains (maybe from here or from here ).

(Gabriel GHEORGHIU) #56

Another try:
I followed this procedure ( ) adapted to location of the virtual hosts and only for WordPress (from download to configure the site- a new database, a new domain).

Now, I have access to new themes, Editor, …, BUT when I change the default theme with another, even after reboot the NS, I can’t see the pictures from theme (same thing an for the first installation(s), I forgot to mention and this). If I revert to the initial theme, I can see all pictures from theme.

I will try following the same procedure to copy the WordPress to /var/www/html/ to see if works there.

(Gabriel GHEORGHIU) #57

“when I change the default theme with another, even after reboot the NS, I can’t see the pictures from theme … . If I revert to the initial theme, I can see all pictures from theme.”

Where can be the problem (of course not me :innocent:)?!?

(Stéphane de Labrusse) #58

I know that wordpress is really sensible from what it writes to its database, for example you cannot change the url once installed without altering the mysql database with the new url.

My guess is if you want two different wordpress installations, install two different wordpress without trying to copy the web files and mysql database

(Gabriel GHEORGHIU) #59

Hi @stephdl ,

We have some sites based on WordPress installed on two servers.
One has CentOS 6.3 as OS, with one WP site and the other has Windows 2012R2 as OS with more than 4 WP sites.

All WP sites are “installed” in the same way and work without issues.
I wrote “installed” because, in fact, each WP site is a copy of the original directory where the archive was unpacked, and then linked to the corresponding database through wp-config.php.

Each WP site has own domain/url.
Before the final version of each site, during negotiation with the customer, we change the theme often, on the same database, without problems.

Bref (in Romania, we, “the oldies”, use often this expression). To have two different WP installation, we copy twice the “original WP” in two different locations (virtual hosts), linked to two different mysql databases. After that, we develop each site till the final version, without changing the URL.

Today, on all my WP installations, I have tried to use virtual hosts and change only the default theme. As I show, I failed.
Maybe is from the updates to CentOS 7.4. Maybe it’s my fault … I will try to install again NS 7.3 and set WP sites with virtual hosts, without updates.

Another try will be to install from scratch CentOS 7.3 basic (without NS), and then follow one of the mentioned procedure from above to see if it works.

Because we have more and more requests for WP sites, I want to use NS for hosting.
So, I want to be sure that everything goes well with NS, to give to my colleagues from software dept. a good HW/SW platform.

Thank you for your reply!

Kind regards,

(Markus Neuberger) #60

I tried it now and it seems to work. I can change themes, add header image and it is shown in any theme…I hope I understood you right.
What I did:

  • Cleaned system by removing all wordpress related packages and erased wordpress db
  • Installed nethserver-wordpress
  • Setup vhost

  • Copied /usr/share/wordpress to …vhost/wordpress2 directory. I did it with mc and selected “follow links” and “Dive into subdir…”.

  • Copied database with phpmyadmin and exported rights for wordpress user
  • Changed wp-config.php

define(‘DB_NAME’, ‘wordpress2’);
define(‘ABSPATH’, ‘/var/lib/nethserver/vhost/wordpress2/’);

  • Browse to wordpress2.domain.local

System version: NethServer release 7.4.1708 (beta1)
Kernel release: 3.10.0-693.2.2.el7.x86_64

2 different themes with header pics: