WordPress.org

Ready to get started?Download WordPress

Forums

moving from sub folder wordpressmu to wordpress ms (41 posts)

  1. gjensen
    Member
    Posted 3 years ago #

    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?

  2. 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)

  3. gjensen
    Member
    Posted 3 years ago #

    It's
    $base = '/';

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

    What's in the htaccess file?

  5. gjensen
    Member
    Posted 3 years ago #

    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>

  6. Okay, change this

    #RewriteBase BASE/

    To

    RewriteBase /

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

  7. gjensen
    Member
    Posted 3 years ago #

    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

  8. 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.

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

    Also, yeah, what Andrea said.

  10. gjensen
    Member
    Posted 3 years ago #

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

    and yes now it's a 403 error -- how to fix that?

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

  12. gjensen
    Member
    Posted 3 years ago #

    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!

  13. 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*.

  14. 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)

  15. gjensen
    Member
    Posted 3 years ago #

    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."

  16. gjensen
    Member
    Posted 3 years ago #

    PS I'm on Plesk

  17. gjensen
    Member
    Posted 3 years ago #

    We have done all of that, any other ideas?

  18. gjensen
    Member
    Posted 3 years ago #

    Ok, I moved the site to cpanel.

    Re-installing and getting this error

    One or more database tables are unavailable. The database may need to be repaired.

    any idea how to fix?

  19. gjensen
    Member
    Posted 3 years ago #

    Ok I figured out to clikc the word repair ands I get
    One or more database tables is unavailable. To allow WordPress to attempt to repair these tables, press the "Repair Database" button. Repairing can take awhile, so please be patient.

    Repair Database
    WordPress can also attempt to optimize the database. This improves performance in some situations. Repairing and optimizing the database can take a long time and the database will be locked while optimizing.

    Repair and Optimize Database

    I click repair databas

    then I get a screeen asking if I'm sure, click please try again

    screen then goes back to repair database and nothing happens

  20. gjensen
    Member
    Posted 3 years ago #

    Ok got repair to work,( database server was down) here are results it told me to post to forum:

    wp_posts: Table 'advicean_newcolumns.wp_posts' doesn't exist
    wp_comments: Table 'advicean_newcolumns.wp_comments' doesn't exist
    wp_links: Table 'advicean_newcolumns.wp_links' doesn't exist
    wp_options: Table 'advicean_newcolumns.wp_options' doesn't exist
    wp_postmeta: Table 'advicean_newcolumns.wp_postmeta' doesn't exist
    wp_terms: Table 'advicean_newcolumns.wp_terms' doesn't exist
    wp_term_taxonomy: Table 'advicean_newcolumns.wp_term_taxonomy' doesn't exist
    wp_term_relationships: Table 'advicean_newcolumns.wp_term_relationships' doesn't exist
    wp_commentmeta: Table 'advicean_newcolumns.wp_commentmeta' doesn't exist

  21. The db user *must* have ALL permissions on the db. When a site is created, new tables are made. If the db user does not have permission to do that... you get these results.

  22. gjensen
    Member
    Posted 3 years ago #

    Ok, after lots of checking by my web host they assure me I have all permissions on the db, can it be anything else?

  23. But do you have access with the ID you have listed in your WP-config.php file?

  24. gjensen
    Member
    Posted 3 years ago #

    yes, I do. My webhost verified I have all privileges.

  25. I'm being pedantic for a reason. Did they verify for THAT id or just YOUR id?

    In my wp-config.php I have my SQL user ID as 'ipstenu_wordpress' for example, and THAT is the ID that needs full privs, not my Ipstenu ID.

  26. gjensen
    Member
    Posted 3 years ago #

    My Sql user id name is the same as my wordpress user name, Privileges are listed in the cpanel control panel under databases. All is marked.

    Do I or can I change anything in the database using phpadmin to help?

  27. Your WordPress username has jack to do with SQL.

    There are multiple IDs, and I'm going to break them down so you can see what I mean.

    1) Your server login ID - this is the ID and password combo you use to SSH/FTP into your server. Generally it's the same as the one you use to get into cPanel.
    2) Your WordPress ID - the one you log into WP with ;)
    3) Your SQL ID - this is the one defined in the wp-config.php, and it's actually created FOR the database. In my case, I made it directly in the database admin screen of cPanel, and assigned it to the databases I wanted, with full permissions.

    It is Entirely Likely that these are totally different IDs with totally different passwords. In fact, I would urge you, for security, to make sure they're all different :)

    I'm trying to make sure that ID #3 is both IN the specific database as a user, AND has full access. They may look similar, but it's really easy to get them confused. Check under the specific WordPress database that you gave the ID access to THAT database.

    Meanwhile, go into the database and verify the tables are actually there. If not, it's possible when you moved from PLESK to cPanel you didn't bring them all over.

  28. gjensen
    Member
    Posted 3 years ago #

    ID# 3 is all privileges, verified by webhost

    The missing tables are not in the cpanel database, nor are they in the plesk database, maybe they got wiped out in one of the plesk re-installs, or?

    So how about if I just add the tables to the cpanel database?

    I can do this manually, would the number of columns and names be the same as wp_1_*

  29. Did you originally have WPMU or was this a wordpreess 3.0 install? In WPMU, you start with WP_1 as your main site, but in WP 3.0 you start with no numerical prefix... It kind of looks like you didn't restore your site but made a new site and then imported the old DB.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags