• Hi,

    I created a new local development WordPress site running 4.6.

    I copied the database from the remote site, added an entry for that site’s domain to use my local IP address in Windows hosts file, and added a vhost entry in my WampServer cfg.

    The site front end loads perfectly.

    However, when I try to view /wp-admin, I receive a white screen with the error:

    Sorry, you are not allowed to access this page.

    I am logged in okay.

    If I create a new administrator user account using PHPMyAdmin (from these instructions), I receive the same error.

    If I renamed /wp-content/plugins to /wp-content/plugins-old, the symptom persists.

    Help appreciated.

    Regards,
    Steve

Viewing 15 replies - 1 through 15 (of 32 total)
  • Thread Starter SRD75

    (@srd75)

    I’ve uploaded a fresh copy of WP4.6 over the top, and the issue remains.

    I’ve cleared my browser cache and the issue remains.

    I’ve checked Chrome Console and there are no errors.

    I have the same issue. I don’t know some authorization problem, Working in my local system as an administrator, looking for solution of this problem from 3 days but got no help. If you resolved your issue please help me.

    I tried add_menu_page() in template 2015 but has same issue nothing different from before.

    I have the same issue:
    I can access site as user but not login as wp-admin, same error message.(Sorry, you are not allowed to access this page)

    I disabled wordfence by renaming plugin name, after that I can login but I can only get to about.php (welcome to 4.6)

    Actually I think my problem has to do with following:
    I had 4.6 version of php’s and loaded database from earlier version.

    First try to go to wp=admin I got a message that DB needs updating. SO I was able to log in but I cannot access admin console at all.

    Sorry, I made a change to table prefix that messed up my test. so disregard my ‘issues’
    :<(

    @petejs do you mind sharing what you did to fix the issue? I too renamed WP prefix and am having the same issue. I can’t access WP admin. Before starting prefix renaming I deactivated WordFence plugin do to suspicion that WordFence might interfere with the process (I had issues with WF when I did this in local.)

    My goal was to upgrade WP and theme, as well as convert server to SSL.
    To prepare for all that I decided to rename database name as well as change prefix. So I tried too much at one go. :>)

    Next time I would do following:
    0. decide on another database name and user. User with correct permissions and a crazy weird password (for protection). create DB and user.
    1. Install Wordfence assistant plugin.
    2. Disable and empty wordfence cache or other caching plugins (save .htaccess so you can replant it). THEN disable wordfence. Test test you still can access WP.
    3. of course do backups, I would take a snapshot as well as mysql export file(and a copy of mysql file).
    4. change WP settings DB NAME, DB USER and Password to new settings.
    5. import mysql file into new database.
    6. empty cache in your browser ( I had so many weird things, not all for them with wordfence. (By the way I think wordfence is a solid product, I am really happy with it).
    7. I did not try to change prefix, somehow that made it more complex so I cannot give you any advice on that, in my case changing database name is actually quite sufficient.
    8. I hade couple of times some weird redirects and locking, must have been WP (?) because at that time wordfence was already disabled.
    9. if new settings work, enable wordfence, test, enable caching.

    I hope this helps.

    This problem is .htaccess file. If there with wp upgradation then there should lot of plugins stop working but no problem in online. This problem is only coming in local server. I didnt find solution but everything will work correct in online.

    Hi,

    I am seeing exactly the same issue here. Running version 4.6.1.
    Transferring a WordPress from A -> B with own prefix in table names and no login to wp-admin anymore.
    I tried:

    – Disabling plugins via DB
    – Renaming plugins folder
    – Renaming template folder
    – Adding additional admin
    – Removing .htaccess (despite that this is pretty standard config)

    Any idea?

    • This reply was modified 8 years, 1 month ago by yopiti.

    In case it helps, I had the same issue after migrating WordPress from local to live server, with custom prefix, and everything was OK except the admin dashboard would not open.

    For me it was because the custom database prefix had a capital in it, which got turned into lowercase through the import and export process. Updating the wp-config allowed the site to function but would not let me access the dashboard.

    I also had to manually update the database in two tables
    1) wp_<customPrefix>_usermeta – look through the “meta_key” column and change all values to the correct prefix (it was about 10 values for me).
    2) wp_<customPrefix>_options – in the “option_name” column find an entry that looks like “wp_<customPrefix>_user_roles” and change it to the correct prefix.

    Once I did this it all worked again.

    I can confirm, by renaming the prefix in the DB and in the wp-config.php to wp_TABLENAME, everything is back to normal. Fortunately I have this option.

    SOLVED!!!

    Hi,

    Here is the issue which is 99% are cause this problem. Please make sure you do follow following points.

    1) DO NOT put capital letters in table prefix, in case you are working on local computer and planning to migrate.

    2) If you do so, make sure after migration change table prefix in “wp-config.php” file to small caps.

    3) because when you import database to phpmyadmin in convert table prefix to small.

    4) FINAL SOLUTION, take backup of your database by exporting from phpmyadmin and keep a copy for safety. after that open database backup in any text editor(I use notepad++) and find and replace all CAPS on table prefix with small Caps by section of match case.

    5) Now select your database from phpmyadmin and check all and drop them. After that import database which you have find-and-replaced in step 4 above.

    Voila!!!

    It’s work like a charm.

    Hope it helps other.

    Thanks,
    Yogi

    Thread Starter SRD75

    (@srd75)

    I did not have capitals in my table prefixes, although the table prefixes were not the standard wp_

    Changing them back to wp_ did not solve the problem.

    pingram

    (@pingram3541)

    Mine were default wp_ before and after import. So prefix doesn’t appear to have anything to do with this problem…at least not in my case.

    -Front end renders fine
    -Enabled global WP_DEBUG and see no errors being generated
    -plugins.old/themes.old doesn’t fix the problem
    -default .htaccess
    -permissions 775/664 throughout all good.

    Appears to be something in the db and wp core

    • This reply was modified 8 years, 1 month ago by pingram. Reason: xtra info
    • This reply was modified 8 years, 1 month ago by pingram. Reason: grammar
    pingram

    (@pingram3541)

    In my case it was the wp_usermeta somehow got messed up using the same method I’ve been using for years so I need to investigate this further but…

    Once I set wp_capabilities to a:1:{s:13:”administrator”;b:1;} and wp_user_role to 10 for my user id I was back in business.

Viewing 15 replies - 1 through 15 (of 32 total)
  • The topic ‘/wp-admin: Sorry, you are not allowed to access this page.’ is closed to new replies.