• Resolved vsacad

    (@vsacad)


    Please help me!

    I’m administrator of my website. But I cannot login directly into my dashboard using the simple link like https://rltsc.edu.in/wp-admin or https://rltsc.edu.in/wp-login.php

    In this case I get the error –

    Sorry, you are not allowed to access this page.

    But when I use the link like https://rltsc.edu.in/wp-admin/upload.php or https://rltsc.edu.in/wp-admin/edit.php and then enter my login credentials, I can login into my dashboard.

    Also I cannot create new page or post using direct method like clicking on Create New Page or Create New Post. But I have to activate Classic Editor plugin, then create new page or post, then publish it. After that when I deactivate that plugin, I can edit that page or post and then update it.

    I tried to deactivate all plugins, but still there is the same problem.

    Kindly help. My website contents lots of data and I fear that some day, it might crash down, I don’t know…!

    I request you, WordPress Team, please help me.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 16 through 25 (of 25 total)
  • Moderator James Huff

    (@macmanx)

    Have you tried from a completely freshly installed browser to rule-out yours? Here are some to choose from: https://browsehappy.com

    Also, are you using Multisite?

    That error occurs in lots of places in WordPress core, but with one exception, and all are within multisite.

    The exception is?https://build.trac.www.ads-software.com/browser/trunk/wp-admin/includes/menu.php?marks=380#L380 where a wp_die is served
    if(!user_can_access_admin_page()){

    And, when you disabled all plugins, did you check for any remaining mu-plugins?

    Thread Starter vsacad

    (@vsacad)

    @threadi

    I already tried this suggestion. Renamed “Plugins” and “mu-Plugins” folder and then tried to login. But got the same error:

    Sorry, you are not allowed to access this page.

    Moderator James Huff

    (@macmanx)

    Are you using Multisite?

    Have you tried from a completely freshly installed browser to rule-out yours? Here are some to choose from:?https://browsehappy.com

    Have you tried these recommendations https://www.ads-software.com/support/topic/cannot-login-to-my-dashboard-directly/#post-17299773 ?

    Thread Starter vsacad

    (@vsacad)

    @macmanx

    Yes sir. My browser (Chrome) is up-to-date.

    I’m not using multisite, but there is one subdomain “junior” and the link for it is https://rltsc.edu.in/junior/

    Does this subdomain create such issues, sir? I don’t know!

    Renamed “Plugins” and “mu-Plugins” folder and then tried to login. But got the same error:

    Sorry, you are not allowed to access this page.

    While searching I found one more .htaccess file in “ai1wm-backups” folder on my cpanel inside “wp-content” folder. It is the backup folder of All in One WP Migration (paid) plugin. The content of this .htaccess are as follows:

    <IfModule mod_mime.c>
    AddType application/octet-stream .wpress
    </IfModule>
    <IfModule mod_dir.c>
    DirectoryIndex index.php
    </IfModule>
    <IfModule mod_autoindex.c>
    Options -Indexes
    </IfModule>

    I am sharing this as I thought that it might be helpful to rectify the issue.

    I also tried the suggestion on this link:

    https://www.ads-software.com/support/topic/cannot-login-to-my-dashboard-directly/#post-17299773

    I created one more user account with Administrative privileges and when I login through that account, I get the same error.

    Sorry, you are not allowed to access this page.

    • This reply was modified 11 months ago by vsacad.
    • This reply was modified 11 months ago by vsacad.

    Hi there

    Before trying the following steps… Always backup your site as a new backup. Ya never know.

    Maybe one of these might help:

    • Change up your php version. Maybe something is going wrong with that… Normally via cPanel you can do that.
    • If the cache and such is clean of your webbrowser and you get the same issues on another device and other webbrowsers… We need to look deeper.
    • Have you tried running the WP debug? Maybe the error log/access log has some info.
    • Have you checked the file permissions?

    Those are the things I can think about. Reading through this thread, I see you disabled all your plugins once… Shot in the dark but disable your theme and try a default theme like Twenty Twenty Four. If that fails, its something in your DB me thinks, since if it isnt the plugins and theme… (Try to deactivate all… Themes and plugins. So basically no active plugin and default theme) … I think something like a permission is stuck somewhere in the db.

    Also, maybe this article can help: https://www.hostinger.com/tutorials/fix-sorry-you-are-not-allowed-to-access-this-page-wordpress

    Thread Starter vsacad

    (@vsacad)

    @nekojonez

    Yes sir.

    I read all your suggestions and checked them accordingly.

    I found that everything is ok, but my database does not have wp prefix with an underscrore.

    It shows like this: rltsc7jk_wp25

    Also this entry in wp-config.php is same.

    As per your suggestions I just tried renaming plugin folder and activated twenty twenty four theme, but it still showing same error while login:

    Sorry, you are not allowed to access this page.

    threadi

    (@threadi)

    In your screenshot here: https://prnt.sc/XbZpxTMLUDvg you can see the meta_key for capabilities. Their user-meta_key must start with the prefix of the database. According to your last answer, however, your prefix is different from the one in the screenshot:

    wpxi in the screenshot
    rltsc7jk_wp25 according to wp-config.php and a look into the database

    I would guess that the user-meta_key for capatibilites is wrong. Change this meta_key (only for your user for now) from wpxi_capatiblites to rltsc7jk_wp25_capabilities. Also change the 2nd associated data set wpxi_user_level to rltsc7jk_wp25_userlevel.

    Then try to log in again with a private browser window.

    Thread Starter vsacad

    (@vsacad)

    @threadi

    Yes sir. I changed both entries as per your suggestion. Please refer the screenshot. But the problem is same. Getting error while logging in with the link: https://rltsc.edu.in/wp-admin

    https://prnt.sc/krNGAfMbLRbp

    (please note the prefix was actually rltsc5b and not the one which I wrote previously while messaging you! Its just for security purpose. Nothing else.)

    https://prnt.sc/8YRt4OT6Hxul

    (please note the prefix was actually rltsc5b and not the one which I wrote previously while messaging you! Its just for security purpose. Nothing else.)

    But if I use the link like https://rltsc.edu.in/wp-admin/upload.php or https://rltsc.edu.in/wp-admin/edit.php and enter login credentials then I can login into my dashboard.

    • This reply was modified 11 months ago by vsacad.
    Thread Starter vsacad

    (@vsacad)

    @nekojonez

    Yes sir. I already followed all steps in this article can help:?https://www.hostinger.com/tutorials/fix-sorry-you-are-not-allowed-to-access-this-page-wordpress

    But couldn’t rectify the problem.

    Thread Starter vsacad

    (@vsacad)

    @nekojonez

    @threadi

    @macman

    I think there might be one thing which I kept on doing for my website.

    Last three times or so, I took the backup of my entire site using All in One WP Migration plugin (paid version).

    Then I installed fresh copy of WordPress on my server using Softaculous utility given in my CPanel.

    When I installed fresh copy of WP on my server, it created new database.

    Then I returned to my new dashboard, install All in One WP Migration paid plugin, upload my backed up file with .wpress extension and then restored it. I did this process twice or thrice.

    So now as I checked my databases in phpMyAdmin console, I found such databases with “No Privileges”.

    And the problem with All in One WP Migration plugin is that it is backing up all these “No Privileges” DBs also and restoring them in my fresh installation of WP.

    I think this might be making a hotchpotch.

    So I dropped all the “No Privileges” databases and installed fresh copy of WP on my server, with same database prefix. Then took the backup using the said plugin.

    Then I visited to my fresh dashboard, restored the backed up file in All in One WP Migration plugin and Presto! it worked.

    So I thank you all of you for your kind and quick support.

    Now that the problem is solved. So I will mark this topic as resolved, after your valuable replies.

    Thanks again and again…! WP Team is just great…! Really appreciate your help…!

Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘Cannot login to my dashboard directly’ is closed to new replies.