Title: [Plugin: PostgreSQL for WordPress (PG4WP)] Error adding a new category
Last modified: August 20, 2016

---

# [Plugin: PostgreSQL for WordPress (PG4WP)] Error adding a new category

 *  ResolvedPlugin Author [hawk__](https://wordpress.org/support/users/hawk_/)
 * (@hawk_)
 * [14 years ago](https://wordpress.org/support/topic/plugin-postgresql-for-wordpress-pg4wp-error-adding-a-new-category/)
 * When your WP+PG4WP setup was done with PG4WP before 1.3.0b1, you may have an 
   error message when creating new categories.
 * This is because of a problem with WP creating categories with specifying the 
   id to be inserted in the table `wp_terms`.
 * PG4WP 1.3.0b1 introduces a filter to correct this problem when installing WordPress
   but if you just upgraded an existing installation you can resolve this particular
   problem by running the following SQL on your PostgreSQL database (using any tool
   you want) :
    `SELECT setval('wp_terms_seq', (SELECT MAX(term_id) FROM wp_terms)
   +1);`
 * Note : you should replace `wp_` with the appropriate table prefix if you changed
   it in your WordPress installation
 * [http://wordpress.org/extend/plugins/postgresql-for-wordpress/](http://wordpress.org/extend/plugins/postgresql-for-wordpress/)

The topic ‘[Plugin: PostgreSQL for WordPress (PG4WP)] Error adding a new category’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/postgresql-for-wordpress.svg)
 * [PostgreSQL for WordPress (PG4WP)](https://wordpress.org/plugins/postgresql-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/postgresql-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/postgresql-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/postgresql-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/postgresql-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/postgresql-for-wordpress/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [hawk__](https://wordpress.org/support/users/hawk_/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/plugin-postgresql-for-wordpress-pg4wp-error-adding-a-new-category/)
 * Status: resolved