[resolved] "My Sites" gone after doing clean upload of WordPress files (17 posts)

  1. Jordan
    Posted 4 years ago #

    I found that someone had hacked my site recently, so I was following the list of security protocols to follow. In doing so, I uploaded new WordPress files for all of the following:

    • Main directory
    • wp-admin directory
    • wp-includes directory

    I did NOT upload a fresh version of wp-config.php -- saved my previous.

    Now, none of my MU sites are showing up in the "My Sites" drop-down on the menu bar at the top of the page.

    When I go to my Network Admin Dashboard, it DOES show "You have 10 sites", but there doesn't appear to be a way to view them from the Network Admin area.

    If I go to one of the sites directly, the WP menu bar at the top of the page still allows me to access that site's Dashboard, however, all the users who should be assigned to that site are completely gone. It's this way across the MU network.

    I attempted the solution in this thread of commenting-out lines 699 and 700 of wp-includes/user.php and that did not solve the problem.

  2. Are they still listed in your database in the wp_sites table?

  3. Jordan
    Posted 4 years ago #

    I don't seem to have a "wp_sites" table. I have a "wp_site" table -- that shows 1 record, and that's my main domain.

    However, there are records for each of the other sites, still in the database. i.e.- wp_1_table, wp_2_table, etc.

  4. wp_blogs, I'm sorry. My brain was dead last night, clearly.

  5. Jordan
    Posted 4 years ago #

    Yes, they're all still listed in wp_blogs.

  6. Have you tried renaming plugins and mu-plugins folders to OLD-plugins etc? Just to see if that's the issue?

  7. Jordan
    Posted 4 years ago #

    Yes, that is not the issue. (Just tried it again for good measure.)

  8. Were you using version 3.3.1 before?

  9. Jordan
    Posted 4 years ago #

    Yes. Seriously, the ONLY thing that changed was that I uploaded the new versions of the files I listed above. Before, worked fine, and after, kaput. :)

  10. Jordan
    Posted 4 years ago #

    [Removed this post -- issue no longer present.]

  11. Jordan
    Posted 4 years ago #

    Okay! So, I'm still not sure exactly what the problem is -- in fact, I'm still HAVING problems, but I'm getting closer to a solution.

    I gave the "move plugins to another directory and move them back in one-by-one" thing another try and lo-and-behold! some of the issues suddenly started to become clearer.

    First off, a plugin (Pending Posts Indicator) was messing with the "Sites" menu on the Network Admin page. Not sure why that started happening now, when it's never been a problem before, but it's off now.

    Next, somehow the list of users that is assigned to each site was removed. So I could access each site because I'm a super-admin, but they weren't showing up in the "My Sites" drop down on the menu bar because me, and everyone else, had been removed from every site except home.

    Here's where it gets really mysterious -- now that I've figured all this out, I'm still having a problem with the user pages on each sub-site. Here's what's occurring:

    1. When viewing "Network Admin > Sites" I see a list of all my sites. I've added myself back to a few of them, and I see my name on this list.
    2. However, when I go to any site's user list, where I've been added, it says "2 items" on the page, but NOTHING shows in between the top and bottom rows of the table. So, I see both the top and bottom table bars (showing "Username | Name | Email" etc.) but nothing in between them.
    3. Next, if I go to any site's "Users > Add New" page, the "Role" box is empty -- no "Admin"/"Editor"/"Author", etc. -- just an empty drop-down with nothing in it. This page allows me to add new users, but again, they don't show up in the Users page.
  12. Jordan
    Posted 4 years ago #

    So I thought this might help. Here's an album showing what's going on with a few pages: http://imgur.com/a/vFF90

  13. I've only seen that when my data serialization got goobered after I did a search/replace in my DB.

  14. Jordan
    Posted 4 years ago #

    Anyone have any idea how to fix this? I don't care if the user lists are gone -- I can recompile them, since we have a relatively small site. I'm just more concerned about making sure it works properly.

    I have very recent database backups (from before this was an issue) and can maybe replace tables with previous versions, if I knew which ones to use?

  15. Jordan
    Posted 4 years ago #

    Anyone anyone? Some of our sites are unfortunately crippled until I can fix this :(

  16. Pulling from a backup may not be a bad idea. It could be corrupt settings FROM a plugin...

    If you have a good known backup from before you were hacked, restore that to a different DB and see if you can point wp-config to that and if it all works.

    You MAY be able to copy of the wp_options table from that.

  17. Jordan
    Posted 3 years ago #

    For those who come after me with the same problem, here's what ended up being the problem:

    I had changed my table prefixes for security purposes, but the tool I used did not change the prefixes WITHIN the usermeta and options tables. There's a number of these that, by default, begin with wp_ and need to be changed to whatever new prefix you chose.

    If you have a large MU site, the easiest way to change the usermeta ones is to download the SQL file, open it in a text editor find all instances of "wp_" and replace with your new prefix. Then go back to SQL, flush the table, upload the new version.

Topic Closed

This topic has been closed to new replies.

About this Topic