Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress - Sorry, you are not allowed to edit this item

I've got weird error message on one of my site after moving to a new hosting

Sorry, you are not allowed to edit this item.

What I found as solutions and didn't work for me is:

  1. I checked all the prefix stuff since my perfix isnt wp_ so everything is accurate in users_meta, also in wp_options.

  2. I even tried inserting new administration user with php code, I got the same error.

  3. I also tried deactivating all the plugins & resetting to default theme but nothing worked.

The server i'm moved on to has ssl, so its https conenction which is covered with updates of all urls inside db.

Another issue is when i logged in wp-admin it shows same message

Sorry, you are not allowed to edit this item.

In the front-end I see the fully functional wp-bar with all buttons edit page/Create New post/page/etc. But when I click it shows same error as above.

Any suggestions?

like image 962
Dragomir Ivanov Avatar asked Jan 26 '17 18:01

Dragomir Ivanov


People also ask

Why can't I edit my website on WordPress?

The explanation: Why you can't edit the blog page The most likely reason is that you (or someone else) has assigned the blog page to be the default Post page in the WordPress settings. To confirm this, you can head over to your WordPress dashboard and click Pages.


1 Answers

If you're trying to edit Categories/Custom taxonomies and you get this error, you should be doing the following.

  1. Check the wp_term_taxonomy table for Term IDs that are associated with more than one Taxonomy ID. These records are the root cause for the error. The following query should help you find that.

    SELECT term_id, COUNT(term_id) FROM wp_term_taxonomy GROUP BY term_id HAVING COUNT(term_id) > 1;
    
  2. Check for the taxonomy column in the wp_term_taxonomy table that you would like to retain and delete the other taxonomy record. Before deleting refer #3.

  3. You should also be deleting records from wp_term_relationships table for the corresponding term_taxonomy_id that you're deleting from the wp_term_taxonomy table.

Tip: Back up your database before executing any DELETE queries on your database.

like image 76
Maria Daniel Deepak Avatar answered Oct 06 '22 00:10

Maria Daniel Deepak