0

The best way to explain this might be to relate my site to a comparison shopping site, as I have around seven tables with 500k+ records each. The content on my site is a comparison of items, and involves variable MySQL queries to create the "content". I imagine there is a way to build database intensive websites on WP, but I have not been able to find the answer thus far.

  • I think he means that he have a full db schema and he wants hos data centric app to respect relations...He wishes for an ORM... – e4rthdog Nov 1 '15 at 15:11
  • I think you should clarify what you mean by "database intensive websites on WP". Do you want to keep your existing database tables and custom SQL queries and use them within a WordPress website? Or do you want to import your data into WordPress and use as much of the builtin database functionality as possible? – Dan Gayle Nov 2 '15 at 7:45
0

It's not complicated to connect to custom tables in WP context and query them, using native wpdb class.

However "not complicated" is about all there it. WP API functions are primarily aimed at querying its own data structures. While wpdb does have some helpers, they are simplistic and not meant for more elaborate custom queries.

Another issue is that by implementation wpdb drags all of query results into memory immediately. This is Bad Idea for any queries that return large amounts of data. WordPress backup plugins (which are query-intensive by definition) typically have to implement their querying from scratch, otherwise they just crash on large sites.

In a nutshell WP won't help you much with this kind of site. If you have other functionality in site that WP is actually good at, then it might be a possibility (since you will be implementing much of it yourself in any case).

If this is your site's main/only function you are likely better off considering alternatives first.

  • Thanks for the solid answer. I was looking at $wpdb() but I had no idea everything is cached. That def. ends that idea as my site already has timeout issues by trying to query too much. My reasoning for switching from a custom build to WP is because I am tired of building out all the plugins and doing all the things that come naturally to WP. E.g. An API for MailChimp v. clicking install. – fwho Nov 1 '15 at 17:12
  • As per conclusions this doesn't exclude making use of WP. If you are already building a custom implementation anyway, pulling it into WP to get benefit from other things it offers can be a pretty valid route. – Rarst Nov 1 '15 at 17:59
-1

Some time ago i would think that this is a valid thing you can ask from wp.

But now i think it is not.

I would choose Laravel for example over wp for what you seek. WP is NOT a full framework for line of bussiness apps.

Off course you can do what you need with WP but in the end you would wish you used something like laravel....

If i was to give an answer i would say that you have either to use core WP with custom post types and taxonomies to build your app or you could use your own custom tables.

Also a third option could be to utilize both and mix custom post types with custom tables....

Have in mind that you dont have an ORM at your disposal with wp...

  • 1
    It is rare to see an answer that is even worse then a bad question. Laravel might be better for him, but maybe he can't change things now after investing two years of development time and that is why he needs a wp solution? It doesn't really help him or almost anyone else to suggest that he should do his website in assembler. – Mark Kaplun Nov 1 '15 at 14:05
  • Laravel is an assembler to those who think WP is a full framework for development of database intensive apps. – e4rthdog Nov 1 '15 at 14:55
  • OP is going to thank himself if he even invests in going away from WP for the use he needs. – e4rthdog Nov 1 '15 at 14:56
  • I don't think this is a bad answer per se, but I am looking for something to smooth over the front-end, not the back-end. I already built a custom back-end, and now I am looking to make things like A/B testing, newsletter sign ups, SEO, etc. easier. – fwho Nov 1 '15 at 17:37
  • @fwho but these are not db intensive operations. In these areas WP can perform exceptionally...Be more specific on what areas exactly you need help. Perhaps you could utilize wp-api v2.wp-api.org and get your data from backend to frontend.. – e4rthdog Nov 1 '15 at 18:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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