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.

I have a project in which I am trying to import a large amount of data into a WordPress installation and from that data, create pages on my site (as a custom post type). Since these pages will be visited far less often than the rest of our site, we decided to keep the data separate from posts and postmeta, so that it doesn't affect load times. The information does need to create the custom posts so that they can be added to the sitemap (using google xml sitemaps - too many to add by hand).

I have created a custom post type and created the beginning of a plugin that creates a custom table in the database. My thought is that I could then create a function that saves the post information to this database rather than post or post meta when it is being created. I know enough php to get by and am new to sql, but have help to turn to if I need it. Unfortunately, they are less well versed on the wordpress side than on coding, so I would like to try to gather as much information as possible before turning to them.

So does this sound like a reasonable plan and does anyone know of resources where I could get a feel of what I would need to do?

share|improve this question
add comment

2 Answers

I advise you look into Pods framework, it will meet your needs and it's very flexible. version 2 is round the corner it allows you to extend or create post types. meta can be stored in separate table if you want.

have a play around, download from github.

i used version 1 and 2(beta) can recommend to anyone. the team behind it provide excellent support as well.

http://podsframework.org/

share|improve this answer
add comment

If you look at wp_insert_post()'s source code, you can see that it's locked to using $wpdb->posts...so you'd really need to modify the core to make it work the way you have outlined (or potentially filter it earlier up in the loop, either way, you're making a mess). That said, having a large number of posts does not put a significant load on your site, since almost everything is done by IDs or by name directly, and rarely, if ever, by filtering from a list of returned results...you're talking like fractions of a millisecond in gains for an incredibly hacky solution. I strongly recommend that you just stick with what wordpress has by default as the structure is quite efficient as it is.

share|improve this answer
3  
optimize elsewhere- opcode cache, varnish cache, memcached. –  Milo Feb 6 '12 at 16:53
add comment

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.