Koozali.org: home of the SME Server

Wordpress 3.1.x Network or MultiUser or Multisite on SME - Solved

Offline thowden

  • *
  • 12
  • +0/-0
Hi

Has anyone got any recent experience with Wordpress 3.1.x (3.1.1 is latest, 3.1.0 is what I am using) on SME Server 8 (beta 6) ?

The old MU (multiuser) version in previous versions of WP is now referenced as WP Network or Multisite depending on where you look.

The point is that .htaccess rules are required to rewrite the wp-admin files/folders to allow access at the subsite level.

I keep getting 500 errors or 404 errors depending the changes that I make.

The live site works fine (on LAMP but not SME) and the site that fails is a copy to my SME dev server at home. All of which leads to me thinking the issue is with the Apache / .htaccess config.

I would note that the single user settings for the same site (if I turn off the Network options) works fine.

Pointers would be appreciated.

cheers
Tony



« Last Edit: April 16, 2011, 10:45:06 AM by thowden »

Offline thowden

  • *
  • 12
  • +0/-0
Re: Wordpress 3.1.x Network or MultiUser or Multisite on SME
« Reply #1 on: April 16, 2011, 09:35:50 AM »
An update on the above:

My .htacess looks something like this:

Code: [Select]
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
# END WordPress

which is the recommended default settings for Wordpress 3.1 Network.

The SME Server /var/log/httpd/error_log reports

Code: [Select]
[Sat Apr 16 17:29:35 2011] [error] [client 192.168.x.x] File does not exist:
/home/e-smith/files/ibays/Primary/html/wp-admin, referer:
http://my.smeserver.local/wordpress/wp-admin/network/sites.php

Which suggests that the issue is that the rewrite rules for the ibay is being ignored and that the wordpress rewrite rule is taking precedence and using / as its root which is interpreted as the Primary ibay which does not have wordpress.

The Wordpress 3.1 Network option uses directory virtualisation to create the sub-directory blog sites and while the site works the admin area does not.

Magic Apache Rewrite voodoo is in play ?

cheers
Tony

Offline thowden

  • *
  • 12
  • +0/-0
Wordpress 3.1.x Network or MultiUser or Multisite on SME: Solved
« Reply #2 on: April 16, 2011, 10:44:19 AM »
Ok, this is now resolved.

Quite simple when you work through the Apache voodoo.

http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritebase

The trick is that the default Wordpress setup for the .htaccess is written without reference to the existing virtualised directories.

From Wordpress
Code: [Select]
# BEGIN WordPress
RewriteEngine On
RewriteBase /


For SME iBay use the ibay root as the RewriteBase
Code: [Select]
# BEGIN WordPress
RewriteEngine On
RewriteBase /ibayname
Note that this is not the ibayname/html it is just the /ibayname

I also noted this at Tonys Tech Blog for my own reference.

cheers
Tony
« Last Edit: April 16, 2011, 10:53:21 AM by thowden »

guest22

Re: Wordpress 3.1.x Network or MultiUser or Multisite on SME - Solved
« Reply #3 on: April 18, 2011, 11:40:36 PM »
Thanks for the info, appreciated.

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: Wordpress 3.1.x Network or MultiUser or Multisite on SME - Solved
« Reply #4 on: April 19, 2011, 02:37:37 PM »
FYI there is an alternative to Wordpress for multiblogging - Quam Plures
I'm trialing it at the moment. This is their website: http://quamplures.net/

I am in no way affiliated to this product and wish only to inform that one can have many blogs from one core install with the absolute minimum of fuss.

Made a minor edit to grammar.

Cheers,
« Last Edit: April 19, 2011, 02:39:16 PM by dishwasher »
SME Server is a fantastic product - thank you!