WordPress.org

Support

Support » Multisite » moving from sub folder wordpressmu to wordpress ms

moving from sub folder wordpressmu to wordpress ms

  • I had a wordpress mu located in subfolder /columns using subdomains

    I moved all the files out of /columns to main directory when I did the upgrade 2.6 to 3.0

    made changes to .htaccess

    Made all the changes to apache plesk server for wildcard subdomains

    added cnames for subdomains

    None of the subdomains work

    when I go to http:advicenadinfo.com/wp-admin
    I get http://adviceandinfo.com/var/www/vhosts/adviceandinfo.com/httpdocs/wp-admin/

    Is apache wrong? .htaccess wrong? something else?

Viewing 15 replies - 1 through 15 (of 40 total)
  • Yeah, you mucked up something in the server config. Somewhere it’s pulling the full server path and stuffing it in the address.

    What’s the $base define in your wp-config? (not the whole file, just that line)

    It’s
    $base = ‘/’;

    The main site works and the links appear correct (but come up with 404)

    What’s in the htaccess file?

    Just noticed that the RewriteBase was commented out, if it isn’t, I get a 500 server error – sorry I forgot about that issue

    RewriteEngine On
    #RewriteBase BASE/

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]

    # add a trailing slash to /wp-admin
    RewriteCond %{REQUEST_URI} ^.*/wp-admin$
    RewriteRule ^(.+)$ $1/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . – [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>

    Okay, change this

    #RewriteBase BASE/

    To

    RewriteBase /

    For starters. I want you to uncomment it AND remove the word BASE

    Ok I changed it to RewriteBase /

    no 500 server error

    but when i clik on a subdomain link I get a 400 error and it goies to
    http://schoolage.adviceandinfo.com/columns/

    The files are no longer in /columns they are in the main directory

    If you physically moved the install, then yes – you’ll have to go edit the URL of every single site to remove the /columns/ folder name.

    http://adviceandinfo.com/wp-admin/ is an error 403 for me now, but no more redirect. Yay?

    Also, yeah, what Andrea said.

    How do I edit the url of every singelsite, in the databses?

    and yes now it’s a 403 error — how to fix that?

    Yeah, go in the database, do a search & replace.

    Ok, I removed all references to /columns in the data

    but the subdomain links still don’t work and still appear to be trying to go to /columns

    Still can’t get into wp-admin

    this is my .htaccess

    RewriteEngine On
    RewriteBase /

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]

    # add a trailing slash to /wp-admin
    RewriteCond %{REQUEST_URI} ^.*/wp-admin$
    RewriteRule ^(.+)$ $1/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . – [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>

    this is what my web host
    said about apache changes
    Requirements for having wildcard SSL
    ————————————-

    To have wildcard subdomains, you need to take care of 2 points.

    1) Have the DNS for *.adviceandinfo.com. point to 216.14.127.109
    2) Have an entry for ServerAlias configured for *.adviceandinfo.com on the Apache configuration file ( needed only if the domain is hosted on a non-dedicated ip or if the ip is not the first domain, if arranged in the alphabetical order )

    In your case, the first condition is satisfied. The second condition is not required, since the domain is the first domain if we arrange the domains hosted on the ip – 216.14.127.109 alphabetically. So, locgically wild card SSL should work with the current configuration you have.

    Testing process.
    —————

    I’ll now let you know, how I tested. This is our expected end result.

    1) Anydomain(or *).adviceandinfo.com should point to the same DocumentRoot of adviceandinfo.com
    2) webmail.adviceandinfo.com should still be redirecting to the horde webmail page.

    To test it, I created a test page – test.html inside the directory – /var/www/vhosts/adviceandinfo.com/httpdocs/, and tried accessing it using 3 randomly generated subdomains –

    http://hjravgwbe5tg7.adviceandinfo.com/test.html
    http://woirqo.adviceandinfo.com/test.html
    http://j3nbtr3.adviceandinfo.com/test.html

    All of them returned the contents of the test file – /var/www/vhosts/adviceandinfo.com/httpdocs/test.html which means wild card SSL is infact working.

    Now, I tried accessing the wordpress using the direct URL of one of the random subdomain – http://hjravgwbe5tg7.adviceandinfo.com which eventhough correctly accessed the files inside the DocumentRoot of adviceandinfo.com gave an error – “Registration has been disabled.”

    This happens only because of one of the following reasons.

    1) Registration is disabled.
    2) WordPress is incorrectly configured.
    3) A mistake in the htaccess file you used for the multi site hosting on WordPress.

    As far as wildcard subdomain is considered, it’s working perfect for the domain – adviceandinfo.com

    thanks for all your help!

    Now, I tried accessing the wordpress using the direct URL of one of the random subdomain – http://hjravgwbe5tg7.adviceandinfo.com which eventhough correctly accessed the files inside the DocumentRoot of adviceandinfo.com gave an error – “Registration has been disabled.”

    This is absolutely correct behavior for a non-existant blog. this part works.

    If you’re still getting references to /columns/ then keep on looking in the db. Blog addresses are hardcoded *everywhere*.

    it happens because of 1) registration is disabled 🙂 This is, as Andrea said, expected and correct behavior. You can see it at fobarmylife.ipstenu.org too. You WANT this.

    Now that I have more coffee … a better .htaccess would be this:

    # 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
    
    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>

    (what you have isn’t WRONG, it’s just not optimized)

    Good Morning,

    Thanks for all your help. Thinking I’m in way over my head need to hire someone to help?

    I finally got into the wp-admin and updated the url and homepage of each blog that got the /columns to go away for all except blog 1

    I had the web host make sure the
    /var/www/vhosts/<adviceandinfo.com>/conf/vhost.conf was:

    ServerAlias *.adviceandinfo.com

    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^www.* [NC]
    RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com
    RewriteCond /var/www/vhosts/domain.com/httpdocs/%1 -d
    RewriteRule ^(.*) /%1/$1 [L]

    Now I’m getting a firefox redirecting not working error using either my orginal .htaccess or the new one posted above

    “The page isn’t redirecting properlyFirefox has detected that the server is redirecting the request for this address in a way that will never complete.”

    PS I’m on Plesk

Viewing 15 replies - 1 through 15 (of 40 total)
  • The topic ‘moving from sub folder wordpressmu to wordpress ms’ is closed to new replies.