I have registered a custom Post Type via register_post_type(), and about 45 Custom Fields via add_meta_box() function, within the theme.
Custom Post Type Args:
'labels' => $labels, 'description' => __( 'Custom Post Type', 'hg' ), 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'testtype' ), 'capability_type' => 'post', 'has_archive' => false, 'hierarchical' => true, 'menu_position' => null, 'supports' => array( 'title', 'editor', 'thumbnail' )
Everything works fine there, and a few tests by manually creating posts via the Admin Editor for this post type proves such.
I written a script to batch import about 20,000 or more into this custom post type and the registered custom fields. Before I go on, I wish to point out that I first ran this script with just 50 or so of the entries, and it imported and everything worked fine.
So, once the 20k posts of the custom post type were imported, I return to my admin and hit on the Custom Post Type via admin (Auto-generated Custom Post Type UX) - and I receive a blank page!
I have researched, and as a result increased PHP memory limit, WP memory limit, WP Max memory limit, and PHP execution time. After which, I now receive the generic WordPress 404 instead of just a blank page.
Here's what I added to wp-config.php:
define( 'WP_MEMORY_LIMIT', '256M' ); define( 'WP_MAX_MEMORY_LIMIT', '2560M' ); set_time_limit(120);
I have also concluded it is nothing to do with the theme or plugins. Once I manually remove all 20k posts from the database via phpMyAdmin, the edit.php page is back in working order. Is this a query overload?
Thanks in advance!