skip to Main Content

I manually migrated one of my sites from one server (Managed WordPress) to my CPANEL hosting.

At the time I of the migration I created a subdomain on the new server (3rdphazewhole.com –> 3rd.remeoner.com), becuase the site was still live on the Managed WordPress Hosting.

After the migration to the sub-domain (3rd.remeoner.com) – this was the first time I got the Sorry, you are not allowed to access this page. Error message.

I was able to quickly fix this by updating the wp_usermeta capabilities value. to what I believe to be the generic value: a:1:{s:13:"administrator";b:1;}.

I was then able to access the wp-admin, but I was still on the sub-domain (3rd.remeoner.com) – I still have to move it to the actual domain (3rdphazewhole.com but on my CPANEL)

After cloning the subdomain 3rd.remeoner.com to 3rdPhazeWholesale.com (on my cpanel) I yet again get the Sorry, you are not allowed to access this page. Error message. and I am unable to access the WordPress Admin

I wasnt worried becuase I just fixed that problem on the sub-domain a:1:{s:13:"administrator";b:1;}, but that wasnt the case.

  1. I updated the wp-usermeta like i did before – get the same error message

  2. I disabled all plugins – got the same error message

  3. I recreated the htaccess file – same error message

  4. I disabled all the themes – same error message

  5. When I replaced the core WordPress Files – that actually made it worse – so I restored the core files with my backup which brought me back to my original state.

  6. I checked the error logs and this error is repeated over and over –
    [28-Sep-2023 13:39:45 UTC] PHP Warning: Undefined array key "capabilities" in /public_html/3rdphazewholesale.com/wp-includes/class-wp-roles.php on line 292

What am I missing?

My goal is to

2

Answers


  1. In cPanel I would open PHPmyadmin and search the entire database for any references to the old domain, and then replace them with the new domain. That has fixed my migration issues in the past.

    Login or Signup to reply.
  2. Check your configuration settings like DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST in the wp-config.php file and regenerate your .htaccess file.

    Check your PHP version

    Verify that the site URL and home fields in the wp_options table are set correctly to your new domain name. Incorrect URLs could lead to this issue.

    Can you please recheck that the wp_capabilities and wp_user_level fields in the wp_usermeta table are set correctly?

    Replace the core files of WordPress and check file permission once, Directories should be 755 or 750, and files should be 644 or 640.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search