Title: rewrite_rules query
Last modified: August 18, 2016

---

# rewrite_rules query

 *  [sitnik77](https://wordpress.org/support/users/sitnik77/)
 * (@sitnik77)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/rewrite_rules-query/)
 * I have lots of pages in my wordpress. Few days ago I have published another page
   and permalink didn’t work. I can find it through search results or edit in admin
   area. However, the permalink to that page shows ‘Page not found’. I found that
   if I delete the “rewrite_rules” in my database and update the permalinks – page
   will work through its normal permalink. However, WP creates rewrite_rules again
   and no new pages will work. My “rewrite_rules” has one very long string ‘option_value’
   with up to 500 000 characters. How can I sort this problem? Maybe “rewrite_rules”
   has to optimized?

Viewing 1 replies (of 1 total)

 *  [ccoupe](https://wordpress.org/support/users/ccoupe/)
 * (@ccoupe)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/rewrite_rules-query/#post-598742)
 * 500KB of rewrite “stuff”! You’re lucky to be running at all.
 * I haven’t verified this myself but someone here claimed that some of the custom
   rewriting data/rules is ihe the wp_options table. (Note to self – never switch
   my blogs to custom permalinks). Anyway, you could see how a software bug or bad
   data in that table could cause a problem. Someone ran across this problem a few
   days ago and the solution was to judiciously clean out the wp_options table. 
   I can’t speak to that because I never had a reason to try and I can’t guess much
   more than the above.

Viewing 1 replies (of 1 total)

The topic ‘rewrite_rules query’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [ccoupe](https://wordpress.org/support/users/ccoupe/)
 * Last activity: [18 years, 10 months ago](https://wordpress.org/support/topic/rewrite_rules-query/#post-598742)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
