• Resolved danhgilmore

    (@danhgilmore)


    I’m having a hard time converting a WordPress Mu 2.8.6 installation from subfolder to subdomain.

    Current:

    URL for the main blog: http://www.domain.tld/blogs/

    URL for the rest of the blogs: http://www.domain.tld/blogs/username/

    What I want it to be:

    URL for the main blog: http://blogs.domain.tld/

    URL for the rest of the blogs: http://blogs.domain.tld/username/

    Steps I’ve taken so far:

    1. Changed BASE in .htaccess and wp-config.php to equal “/”
    2. Ran the following SQL queries:

    UPDATE wp_blogs SET domain = 'blogs.domain.tld';
    UPDATE wp_blogs SET path = (SELECT SUBSTR(path, 7));   (This removed '/blogs/' from every path entry)
    UPDATE wp_site SET domain = 'blogs.domain.tld';
    UPDATE wp_site SET path = '/';
    UPDATE wp_site_posts SET post_permalink = REPLACE(post_permalink, 'http://www.', 'http://blogs.');
    UPDATE wp_site_posts SET post_permalink = REPLACE(post_permalink, '/blogs/', '/');

    3. I have a script that hits every wp_X_options table and changes the siteurl, home, and fileuploads values to reflect the new URL. I’ve verified that the values are in the database correctly.

    4. Re-saved the permalink options

    5. Deactivated all plugins.

    Results:

    1. The main blog page comes up just fine at http://blogs.domain.tld/ as does the admin page for the main blog.

    2. When I click on a link for a blog (not a specific blog post), I get redirected to the main blog page. Nothing in error log. Access log shows a 200.

    3. When I click on a link for a specific blog post, I receive “Sorry, no posts matched your criteria”.

    .htaccess file:

    RewriteEngine On
    RewriteBase /
    
    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.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>
    
    # END WordPress

    If anyone has any ideas on this, I’d be most appreciative.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Moving from subfolder to subdomain installation’ is closed to new replies.