Title: Fatal Error coming from functions-post.php
Last modified: August 18, 2016

---

# Fatal Error coming from functions-post.php

 *  [oncidium](https://wordpress.org/support/users/oncidium/)
 * (@oncidium)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-coming-from-functions-postphp/)
 * While updating a wp page today, I recieved this error:
    Fatal error: Call to 
   undefined function: flush_rules() in …/blog/wp-includes/functions-post.php on
   line 199
 * I looked at the functions-post file, and this is what seems to be causing the
   error:
 * else if ($post_status == ‘static’) {
    $wp_rewrite->flush_rules();
 * The page updated and saved to the database fine, so it doesn’t make a huge use
   issue, but I’m not sure why that is happening.

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

 *  [n8them8c](https://wordpress.org/support/users/n8them8c/)
 * (@n8them8c)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-coming-from-functions-postphp/#post-316906)
 * Did you discover an answer? I am having the same problem since upgrading to WP
   2.0.1. When updating a page, I get
 *  Fatal error: Call to undefined function: flush_rules() in …/wp-includes/functions-
   post.php on line 200.
 * But line 200 has only some comments on it. Any clues?
 *  [n8them8c](https://wordpress.org/support/users/n8them8c/)
 * (@n8them8c)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-coming-from-functions-postphp/#post-316907)
 * I commented out “$wp_rewrite->flush_rules();” in my functions-post.php file and
   am now able to post and edit pages without a problem. I’m no php pro. Does anyone
   know what the flush_rules function does? Is it going to cause problems if I disable
   it? Thanks.
 *  [bilcha](https://wordpress.org/support/users/bilcha/)
 * (@bilcha)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-coming-from-functions-postphp/#post-316910)
 * I ran in to this as well and finally tracked it down today. Commenting out the
   flush_rules calls will work but it will break your ability to create permalinks
   for new pages.
 * Problem seems to be a missing function in /wp-includes/classes.php.
 * To fix it look for…
 * `
    $rules = apply_filters('rewrite_rules', $rules); // Deprecated
 *  return $rules;
    }
 * around line 1417, below it add…
    ` function flush_rules() { generate_page_rewrite_rules();
   delete_option('rewrite_rules'); $this->wp_rewrite_rules(); if ( function_exists('
   save_mod_rewrite_rules') ) save_mod_rewrite_rules(); }
 * What and where is easier seen here [http://redalt.com/xref/trunk/nav.htm?wp-includes/classes.php.source.htm#l1417](http://redalt.com/xref/trunk/nav.htm?wp-includes/classes.php.source.htm#l1417)
 *  [forksteel](https://wordpress.org/support/users/forksteel/)
 * (@forksteel)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-coming-from-functions-postphp/#post-316922)
 * hey bilcha,
 * tried this and this worked for me!
    one question though: you state here to use“
   generate_page_rewrite_rules();” but your trunk shows “generate_page_uri_index();”
   what’s the difference? which should i use?

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

The topic ‘Fatal Error coming from functions-post.php’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 4 participants
 * Last reply from: [forksteel](https://wordpress.org/support/users/forksteel/)
 * Last activity: [20 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-coming-from-functions-postphp/#post-316922)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
