Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Suddenly one of my test sites became absolutely unresponsive after testing with wp_insert_post( $my_post )

I Installed the black box plugin and checked what queries are slowing it down

I found one that takes 10 seconds to load. I deactivated all plugins that were activated recently but it's still slowing everything down. Also noticed that PHP crashed a couple times due to this. Any ideas what could be causing such a slowdown?

I REMOVED PARTS due to the length (end: WHERE option_name = 'rewrite_rules';)

UPDATE `wp_options` SET `option_value` =
'a:77:{s:47:\"category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:52:\"index.php?category_name=$matches[1]&feed=$matches[2]\";s:42:\"category/(.+?)/(feed|rdf|rss|rss2|atom)/?$\";s:52:\"index.php?category_name=$matches[1]&feed=$matches[2]\";s:35:\"category/(.+?)/page/?([0-9]{1,})/?$\";s:53:\"index.php?category_name=$matches[1]&paged=$matches[2]\";s:17:\"category/(.+?)/?$\";s:35:\"index.php?category_name=$matches[1]\";s:44:\"tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:42:\"index.php?name=$matches[1]&feed=$matches[2]\";s:35:\"([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:43:\"index.php?name=$matches[1]&feed=$matches[2]\";s:28:\"([^/]+)/page/?([0-9]{1,})/?$\";s:44:\"index.php?name=$matches[1]&paged=$matches[2]\";s:35:\"([^/]+)/comment-page-([0-9]{1,})/?$\";s:44:\"index.php?name=$matches[1]&cpage=$matches[2]\";s:20:\"([^/]+)(/[0-9]+)?/?$\";s:43:\"index.php?name=$matches[1]&page=$matches[2]\";}'
WHERE `option_name` = 'rewrite_rules';
share|improve this question
    
it seems to be a known issue with "attachments" wordpress.org/support/topic/… - I'll check if I can find a fix, any input appreciated –  mashup Nov 17 '13 at 17:37

1 Answer 1

The solution was to change the permalink structure from

/%postname%/%post_id%

to:

/%post_id%/%postname%/

This magically fixed it - possibly Wordpress queries are not so efficient the other way around or I ran into a bug with a plugin. Anyway, it's blazing fast again, both backend and frontend

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.