Cannot add new wordpress category.

By | 1 September, 2020

Symptom :

WordPress existing categories can be deleted. But new categories cannot be added. Either directly via Posts > Categories or via inside the Post > Post Title > Edit > Side Menu Categories.

Source of the problem :

The database “Auto Increment” function did not been activated on the related database.

Possible Causes :

Bug during upgrade to newer WordPress or plugin version,

Manual WordPress websites transfer (Via manual download and upload Database) from the old server to new server.

Database Table that needed fixing :

  1. wp_terms
  2. wp_termmeta
  3. wp_term_taxonomy

Solution:

Enable Auto-Increment (In phpMyAdmin) on the above mention above Database Table.

If user have access to Cpanel and webhosting provider allows access to PhpMyAdmin. User can follow the below step to fix the problem.

Login to Cpanel > Cpanel Dashboard > PhpMyAdmin (Under Database Category) > Look For Related WordPress Database name > Lookfor the table that need fixing as per above (sometime the database has unique id behind “wp” for example “wpds_terms”) and click it.

Once you click it will bring you to the  table “Browse” tab. Next to it theres a “Structure” tab. Click it. Look for golden key icon where besides it has “_id” for example, in wp_terms, it has “term_id” and next to it, it has Pencil icon with a clickable “change” link, click it and tick the “A_I” box and save the changes.

Lastly Clear Cache and categories will function normally again.

This solution was found when im looking to fix for a fix for other issues and found out that this solution can also be used in many more other situation like cannot make a new post, or cannot create a new page. Each of it should have the same issues where related database table Auto Increment function is not enable which lead to such cases. 

Special thanks to the original poster here: https://wordpress.stackexchange.com/questions/226245/could-not-insert-term-into-the-database

2 thoughts on “Cannot add new wordpress category.

    1. Aizat W Post author

      Hi have you tried to see your error log? or enable debug mode? maybe you can find more info regarding to your issues there. The one we suggested here is only one of the scenario that happened. But its not the only cause.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.