• Resolved achanne

    (@achanne)


    Hi All,

    I am working on a site that used to have a second site attached to it in a multisite setup (a main site at https://www.example.com and second site at site2.example.com). The second site (site2.example.com) has been deleted from the network admin dashboard and its contents (the entire folder of the site2 including all WordPress files) deleted through FTP.

    I then tried to revert back to a single site configuration by commenting out the multisite lines and setting multisite to “false” in wp-config.php. When I login to example.com/wp-admin with an admin account, I get a message on the screen that says “sorry you are not allowed to access this page” when I try to go to the dashboard.

    As a multisite, both sites used the same database but with different table prefixes. For example, “wp_dxvd_” for tables used by the main site and “com_” for the second site. All tables with the “com_” prefix have already been dropped. Login were shared between both sites, so if you were logged into one site as admin, you could go to the other site as admin without having to login again.

    I have already tried different .htaccess pages but admin was still blocked from the dashboard.

    For one admin user (we’ll call this “testadmin”):
    “wp_dxvd_capabilities” is set to a:1:{s:13:”administrator”;b:1;}
    “wp_dxvd_user_level” is set to 10

    But here’s the strange thing: with the site back in multisite so I can access the dashboard, when I revoke “testadmin” admin status through the networkadmin user list, the setting above DID NOT CHANGE despite no longer having admin privileges, if this might give a clue.

    Does anyone know how to give admin access to dashboard with the site reverted to single site?

    Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter achanne

    (@achanne)

    I found the answer!!! In the table wp_options (wp_dxvd_options in our case), for wp_dxvd_user_roles (wp_user_roles in most other cases) was set to ‘a:0{}’. Since the correct value is pretty generic, the simple fix was to go to a working single site and just copy the value from there and paste into the value field in our database.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.