It’s possible your admin user lost capabilities to access stuff. You can try resetting capabilities to see if that helps.
Make sure you download/export database backup before doing anything.
Add this code to your functions.php file in your active theme:
if ( !function_exists( 'populate_roles' ) ) {
require_once( ABSPATH . 'wp-admin/includes/schema.php' );
}
populate_roles();
Then load your website in browser to trigger it. Then try to login. Hopefully that’ll fix your problem and will allow you to login.
After you’re done, you can remove this code from functions.php.
Thanks for your suggestion. I followed this and find the same result.
I have enabled php debugging and the following errors came.
1. Notice: Undefined offset: 0 in /home1/classicy/public_html/wp-content/plugins/simple-link-directory/class-qc-free-plugin-upgrade-notice.php on line 175
2. Notice: Undefined index: jetpack in /home1/classicy/public_html/wp-content/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-about-page.php on line 97
3. Warning: Invalid argument supplied for foreach() in /home1/classicy/public_html/wp-content/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-about-page.php on line 97
Sorry, you are not allowed to access this page.
Kindly advice
Thanks for the reply.
It works. Initially, I forgot to trigger it by loading website.
Thanks and regards
But all my posts show 404 error
Check your htaccess file, make sure you have this there:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
If it’s there but posts still show 404, go to Settings > Permalinks and click Save. This will flush and reset permalinks, and usually fixes many 404 issues.
Nothing found in there.
I have copied this.
I suppose file permissions have changed. I have given 644 like similar files.
Now it works.
Thank you
That’s also a possibility. Glad to hear it’s working now.
-
This reply was modified 6 years, 12 months ago by
ProjectArmy. Reason: Typ