Title: Database error after upgrading: wp_post2cat&#8217; doesn&#8217;t exist
Last modified: August 18, 2016

---

# Database error after upgrading: wp_post2cat’ doesn’t exist

 *  [hipsilon](https://wordpress.org/support/users/hipsilon/)
 * (@hipsilon)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/database-error-after-upgrading-wp_post2cat-doesnt-exist/)
 * Hi all, after upgrading WP to 2.3, I wrote a post but on click to ‘Save and continue
   editing’, or ‘Save’, get next error:
 *     ```
       WordPress database error: [Table 'eygigavz_blog.wp_post2cat' doesn't exist]
       SELECT cat_ID AS ID, MAX(post_modified) AS last_mod FROM <code>wp_posts</code> p LEFT JOIN <code>wp_post2cat</code> pc ON p.ID = pc.post_id LEFT JOIN <code>wp_categories</code> c ON pc.category_id = c.cat_ID WHERE post_status = 'publish' GROUP BY cat_ID
   
       Warning: Cannot modify header information - headers already sent by (output started at /home/eygigavz/public_html/blog/wp-includes/wp-db.php:160) in /home/eygigavz/public_html/blog/wp-includes/pluggable.php on line 390
       ```
   
 * wp-db.php lines 144 to 164:
 *     ```
       //	Print SQL/DB error.
   
       	function print_error($str = '') {
       		global $EZSQL_ERROR;
       		if (!$str) $str = mysql_error($this->dbh);
       		$EZSQL_ERROR[] =
       		array ('query' => $this->last_query, 'error_str' => $str);
   
       		$str = htmlspecialchars($str, ENT_QUOTES);
       		$query = htmlspecialchars($this->last_query, ENT_QUOTES);
       		// Is error output turned on or not..
       		if ( $this->show_errors ) {
       			// If there is an error then take note of it
       			print "<div id='error'>
       			<p class='wpdberror'><strong>WordPress database error:</strong> [$str]<br />
       			<code>$query</code></p>
       			</div>";
       		} else {
       			return false;
       		}
       	}
       ```
   
 * pluggable.php lines 372 to 395:
 *     ```
       // Cookie safe redirect.  Works around IIS Set-Cookie bug.
       // http://support.microsoft.com/kb/q176113/
       if ( !function_exists('wp_redirect') ) :
       function wp_redirect($location, $status = 302) {
       	global $is_IIS;
   
       	$location = apply_filters('wp_redirect', $location, $status);
   
       	if ( !$location ) // allows the wp_redirect filter to cancel a redirect
       		return false;
   
       	$location = wp_sanitize_redirect($location);
   
       	if ( $is_IIS ) {
       		header("Refresh: 0;url=$location");
       	} else {
       		if ( php_sapi_name() != 'cgi-fcgi' )
       			status_header($status); // This causes problems on IIS and some FastCGI setups
       		header("Location: $location");
       	}
       }
       endif;
   
       if ( !function_exists('wp_sanitize_redirect') ) :
       ```
   
 * What can I do?
 * Thanks all.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/database-error-after-upgrading-wp_post2cat-doesnt-exist/#post-639159)
 * Please review [http://wordpress.org/support/topic/135564?replies=69](http://wordpress.org/support/topic/135564?replies=69)
 *  Thread Starter [hipsilon](https://wordpress.org/support/users/hipsilon/)
 * (@hipsilon)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/database-error-after-upgrading-wp_post2cat-doesnt-exist/#post-639166)
 * Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Database error after upgrading: wp_post2cat’ doesn’t exist’ is closed
to new replies.

## Tags

 * [pluggable](https://wordpress.org/support/topic-tag/pluggable/)
 * [upgrade](https://wordpress.org/support/topic-tag/upgrade/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [hipsilon](https://wordpress.org/support/users/hipsilon/)
 * Last activity: [18 years, 7 months ago](https://wordpress.org/support/topic/database-error-after-upgrading-wp_post2cat-doesnt-exist/#post-639166)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
