WordPress.org

Ready to get started?Download WordPress

Forums

MULTISITE not defined (6 posts)

  1. mainsocial2
    Member
    Posted 4 years ago #

    Recently we upgraded a WPMU 2.7.1 server to WordPress 3.0. We were initially pleasantly surprised - it all just worked. But today we realized that uploading media files wasn't working.

    function wp_upload_dir() is returning an erroneous value for the url. It is correctly returning "wp-content/blogs.dir/1/files" as the path, but is returning "files" as the url. This is happening because the $main_override variable is false, which is because MULTISITE is not defined anywhere. If I define MULTISITE in wp-config, WordPress responds to any request saying that some SQL tables are out of whack.

    I've solved the problem in nginx by creating a rewrite rule, but I wonder if this lack of a MULTISITE definition is going to bite us in other ways. Posting here for some insight - is this a bug or defect, or is it just a result of our non-standard upgrade path?

    Thanks in advance,
    Ben

    ps. nginx rewrite rule, in case it helps anyone:

    location /files {
    rewrite ^.*/files/(.*)/(.*)/(.*) http://67.23.3.6/wp-content/blogs.dir/1/files/$1/$2/$3;
    }

  2. if you went straight from 2.7 to 3.0, then yeah. something got out of whack along the way.

    (and upgrading from mu you don't need to put in those multisite variables)

  3. gazouteast
    Member
    Posted 4 years ago #

    Andrea.....

    Can you explain this a bit more -
    (and upgrading from mu you don't need to put in those multisite variables) ???

    You got me wondering now ....

  4. @gazouteast - the OP said this: "If I define MULTISITE in wp-config, "

    I'm telling him if he upgraded from MU, he does not need to do that. he is already running a network. Every single define listed in the "create a network" codex page is irrelevant if you are upgrading from MU.

  5. Ron Rennick
    MultiSite Guru
    Posted 4 years ago #

    "function wp_upload_dir() is returning an erroneous value for the url. It is correctly returning "wp-content/blogs.dir/1/files" as the path, but is returning "files" as the url."

    That's what your MU 2.7.1 returned from wp_upload_dir() as well.

    You do have to update your nginx rewrite rules. There is a rule you have to change from wp-content/blogs.php to wp-includes/ms-files.php.

  6. gazouteast
    Member
    Posted 4 years ago #

    Thanks Andrea

    Thinks there's an 800 lb gorilla size headache approaching 3.0 users who upgraded from MU ....

    VHOSTS is deprecated and the codex and changelog for 3.0 states it has been temporarily retained for plugin compatibility, but if you run WP_DEBUG in wp-config you get a big nasty notice telling you to change to MULTISITE_INSTALL

    That then wallops you with all the tables out of whack, table upgrading and repair, and a whole heap of other nastiness that the OP reported - did it last night and completely trashed the test migration from 2.9.2 MU to 3.0 multisite.

    I can't state explicitly why, but I have this lingering feeling there's some sort of disconnect between MU and 3.0 - changing all the names of constants and the massive deprecated functions list doesn't help ease this.

    Busy rolling back to MU 2.9.2 all the sites I tried to upgrade, which all stopped functioning under 3.0 - wish there was a one click "degrade" button alongside the "upgrade" button ... like what there is in SMF Forums.

    Gaz

Topic Closed

This topic has been closed to new replies.

About this Topic