WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Add Site not creating necessary tables (8 posts)

  1. mitc0185
    Member
    Posted 3 years ago #

    We have a relatively new WP Multisite install (about a month old). As of recently, we're unable to add new blogs to our site. Or, I should say, we can add new blogs, but they're not being added correctly.

    When I look at the database, the new entry is being added to wp_blogs, but I'm not seeing tables created with the corresponding blog_id (wp_X_commentmeta, wp_X_comments, wp_X_links, etc...). I've checked that the DB user I'm using has permission to create tables.

    The "Create a Network" page in the CODEX has this about multisite installs:

    You cannot choose Sub-directory Install in the following cases:
    If your existing WordPress installation has been set up for more than a month, due to issues with existing permalinks. (This problem will be fixed in a future version.)

    I'm not sure if this applies to my situation or not. I chose sub-directory install immediately after setting up the site. However, my site is now more than a month old. Does the sentence above mean that after a month you can't create new blogs on a Multisite install if you're using the subdirectory option? I'm having a hard time believing that this limitation exists in a stable release.

  2. Does the sentence above mean that after a month you can't create new blogs on a Multisite install if you're using the subdirectory option?

    Nah. It just means that, because it's possible your permalink setup could have collisions with a subfolder setup, you shouldn't start with it if you have an old blog. Not that you can't, and if you're savvy, it's perfectly safe to switch around. But for many novice users, it's safer.

    When I look at the database, the new entry is being added to wp_blogs, but I'm not seeing tables created with the corresponding blog_id (wp_X_commentmeta, wp_X_comments, wp_X_links, etc...). I've checked that the DB user I'm using has permission to create tables.

    What happens when you go to the new site? Does it show up?

    If not, then ... triple check that DB user. The most likely reason is it doesn't have create perms.

  3. mitc0185
    Member
    Posted 3 years ago #

    Nah. It just means that, because it's possible your permalink setup could have collisions with a subfolder setup, you shouldn't start with it if you have an old blog. Not that you can't, and if you're savvy, it's perfectly safe to switch around. But for many novice users, it's safer.

    Well, I guess that rules that out.

    What happens when you go to the new site? Does it show up?

    No. What I do get is a message that says "Error establishing a database connection".

    If not, then ... triple check that DB user. The most likely reason is it doesn't have create perms.

    Checked again, and tried creating another user. Users can create tables with mysql client. Also, we were able to create blogs a few weeks ago. Nothing has changed since then (that I know of).

  4. That's bizarre. no new plugins?

  5. Collation I bet. :) Gotta be utf 8 on the db and the content. If those are different you get the same error.

  6. still giving
    Member
    Posted 3 years ago #

    Interesting ... I have encountered the same problem where our host moved our domain from one server to another.

    It is true, the second server was still set to the server default latin1_swedish (...why do admins leave it like that!?!) but after changing all tables, it will still not make new blogs.

    What I notice is, that when I go to Network Admin > Sites > Sites and rollover the link to 'Visit' the blog, the link goes to 'http://example.com/wp-admin/network/sites.php' instead of the sub-domain it should and as the blogs previous made do, e.g. 'http://sub-domain.example.com/'.

    When I make a new blog/sub-domain, WP-MS adds it to the list of blogs but does not add it to the database nor does anything appear in blogs.dir.

    I used this script to update the encoding on the tables.

    <?php
    $db = mysql_connect('localhost','<em>database_user</em>','<em>password</em>');
    if(!$db) echo "Cannot connect to the database - incorrect details";
    mysql_select_db('<em>database_name</em>'); $result=mysql_query('show tables');
    while($tables = mysql_fetch_array($result)) {
    foreach ($tables as $key => $value) {
    mysql_query("ALTER TABLE $value COLLATE utf8_general_ci");
    }}
    echo "The collation of your database has been successfully changed!";
    ?>

    *Please note there is ANOTHER bug in the WP wysiwyg editor. When editing one's posts, it strips the 'code' tag out and adds all sort of html instead, e.g. br and em.

    That is truly appalling and should never have bundled!!!

  7. fredhag
    Member
    Posted 3 years ago #

    I am having the same trouble. For me, I don't have subdirectory install, and all my tables are utf-8 and that's what's in my config. Did anyone find the cause or come up with a solution?

  8. Fredhag, new topic please. This one's old (and was resolved elsewhere).

    Closing this one.

Topic Closed

This topic has been closed to new replies.

About this Topic