Title: Extremely slow WordPress edit.php
Last modified: August 21, 2016

---

# Extremely slow WordPress edit.php

 *  Resolved [Josh Levinson](https://wordpress.org/support/users/joshlevinson/)
 * (@joshlevinson)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/extremely-slow-wordpress-editphp/)
 * I described a problem I was having here: [http://wordpress.org/support/topic/site-with-large-number-of-post](http://wordpress.org/support/topic/site-with-large-number-of-post)
   
   along with a request for some info about suggested hosting requirements.
 * I decided to poke into the underlying issue myself to see why the edit.php page
   was so slow in loading. I used SAVEQUERIES to find out this query was being executed:
 * `SELECT * FROM wp_posts WHERE (post_type = 'my-custom-post-type' AND post_status
   = 'publish') ORDER BY menu_order,wp_posts.post_title ASC`
 * This is the stack trace that executed that SQL:
    `WP_Posts_List_Table->inline_edit,
   wp_dropdown_pages, get_pages`
 * After stepping through that code, it appears that WordPress is asking for ALL
   posts with my custom post type, then looping through them in several places –
   like with `array_map( 'get_post', $pages );` in the get_pages function.
 * I was surprised to see this functionality – I didn’t see the point in looping
   over ALL posts of a certain post type. Unless I’m missing something, the only
   reason to retrieve information more than what is needed for the current WP_List_Table
   would be the count of posts for that post type for pagination/post count. But
   that would obviously only require a COUNT query, not a full blown SELECT *, along
   with looping over each post to turn it into a WP_Post object…
 * I performed similar test with the following scenario:
    Visiting edit.php?post_type
   =page on 100% vanilla WP 3.5.2. The same query is executed; same stack trace.
 * What is the deal?? Am I correct in thinking that querying all available information
   for 17,000 posts, then looping over those posts with the array_map is a huge 
   load?

Viewing 1 replies (of 1 total)

 *  Thread Starter [Josh Levinson](https://wordpress.org/support/users/joshlevinson/)
 * (@joshlevinson)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/extremely-slow-wordpress-editphp/#post-3931620)
 * Found the issue. Types plugin from WP-Types caused the load apparently. Deactivating
   that plugin and registering the post type myself fixed it.

Viewing 1 replies (of 1 total)

The topic ‘Extremely slow WordPress edit.php’ is closed to new replies.

## Tags

 * [edit-post](https://wordpress.org/support/topic-tag/edit-post/)
 * [edit.php](https://wordpress.org/support/topic-tag/edit-php/)
 * [editing posts](https://wordpress.org/support/topic-tag/editing-posts/)
 * [wordpress core](https://wordpress.org/support/topic-tag/wordpress-core/)

 * 1 reply
 * 1 participant
 * Last reply from: [Josh Levinson](https://wordpress.org/support/users/joshlevinson/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/extremely-slow-wordpress-editphp/#post-3931620)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
