HowTo install Wordpress on NethServer

Great!

I will try tomorrow if I will have time, following your procedure and I will report back.

Thank you again !

Kind regards,
Gabriel

You’re welcome.

I’m already curious… :smile:

2 Likes

If all works, a script may be nice like:

which

  • copies a webapp from a template dir to the specified vhost, which may be automatically created
  • clones database from a template db(or just creates empty one) and gives it specified name and rights
  • makes config file changes

So we may provide webapps in a smooth way…just an idea.

1 Like

The usually way, for a new WP site, is:

  • copies a webapp from a template dir to the specified vhost
  • creates an empty database and gives it specified name and rights
  • makes config file changes (wp-config.php)

Will be nice to be a script!

I had read that Nethserver 7.5 no longer uses the templating system httpd so i manually installed wordpress in the /var/www/html folder ran the command chown -R apache:apache /var/www/html/ then created sql database manually for wordpress, set my wordpreess site up through https://www.mydomain.com/wp-admin logged into wordpress ran the updates started adding pages I can access my site fine doing https://www.mydomain.com however if I go to any of the pages http://www.mydomain.com/about I get the below anyway to fix this

The requested URL /about/ was not found on this server.

Could you check your permalinks in WordPress and also check that .htaccess is writable. If that doesn’t work change the AllowOveride None to AllowOveride All and see if that works. Hope this helps.

Where did you read that?

Don’t remember where but its true, httpd.conf is a static file

Hi stevieb413,

I am on 7.6.810 and have the same problem. If the permalink is set to something else than simple I receive the message “The requested URL … was not found on this server”.

If I set to “Nom de l’article” (Name of the article) it will create the .htaccess file and I cannot access nothing - it looks like the WordPress disappeared.

If I erase the content of .htaccess, WordPress is back.

Also in wp-config.php I have to add:

if(is_admin()){
add_filter(‘filesystem_method’, create_function(’$a’, ‘return “direct”;’ ));
define( ‘FS_CHMOD_DIR’, 0751 );
}

If I don’t, WordPress cannot find the path.

It’s been 2 days that I am on WordPress.

Last month, with Duplicator extension, I migrated my main web site (WooCommerce) to a NethServer virtual host and it is working but I didn’t try everything. I run it in VirtualBox to test it.

Michel-André

Can you try to add a .httaccess and give it the rights 777 .
Set the permalinks to “Postname” and try again to see what it will do.
If it works, then give it the rights 444 and see if it still works.

I did that after installing the Stephdl WordPress and it works.
I have: https://www.toto.org/wordpress/**bonjour-tout-le-monde**/

I will try to install a standard WordPress in /var/www/html and see what it will do.
I will let you know…

Michel-André

I think I found the show stopper.

It is /etc/httpd/conf/httpd.conf at line 151: AllowOverride None inside <Directory “/var/www/html”>
If I change it for: AllowOverride ALL then everything is working fine.

If it is at None, it will not process any .httaccess it finds; it skips all of them.

Wordpress is looking for the page with the suffix Potsname but it cannot find it because without httpd reading the .httaccess WordPress think the permalinks is set to Postname which is not, it is set to Plain and he cannot find the page and display an error of “Page not found”. Correct me if I’m wrong.

There should be a way to modify the httpd.conf with a custom template.

At least now I know where to look or maybe somebody knows how to do that…

Michel-André

PS:
Re-reading all the posts I see that I am writing the same thing as makshaz wrote 19d ago.

PPS:
Fragment /etc/e-smith/templates/httpd/vhost-extra/30directory20allowoverride has the directive: AllowOverride All That is why it is working with Vhost but not with /var/www/html

So if StephDL say that “httpd.conf is a static file” then I just have to edit /etc/httpd/conf/httpd.conf and the problem will be solved?

The only problem left is why do I have to add those extra lines at the end of wp-config.php so that WordPress will find the path?

if(is_admin()){ add_filter(‘filesystem_method’, create_function(’$a’, ‘return “direct”;’ )); define( ‘FS_CHMOD_DIR’, 0751 );}

Any comment is appreciated,

could I suggest to use either a virtualhost from the module, or to create your own virtualhost by adding a configuration in /etc/httpd/conf.d/myWordpress.conf

Like this you will have your free hand, /var/www/html is likely to drop a web application just for testing it…IMHO

Version: 7.6
# yum install --enablerepo=nethforge nethserver-wordpress
No package Nethserver-WordPress available.
Error: Nothing to do

Please, follow up to date instructions from:
https://wiki.nethserver.org/doku.php?id=wordpress