Create pages from MySQL database

You really should dive in more yourself. I’m not sure how good of a programmer you are, but you almost certain have to start to write a script that extracts all the information you want from the database and put this in an array. Once you’ve done that, you can use this data to create … Read more

Optimize slow SQL query for multiple meta values

First you can optimize a little by not joining with wp_users as the joins can all be done between wp_usermeta. Another optimization would be to replace the WHERE clause with a subselect (which MySQL manages to optimize so it only gets executed once). The meta_key clause parts should be put into the WHERE clause I … Read more

How to use AJAX in WordPress in MYSQL query?

In WordPress it little bit complicated then default way to handle ajax form data. odify your js code like this. function ajaxSubmit(e){ // prevent the default action. e.preventDefault(); var myform= jQuery(this).serialize(); jQuery.ajax({ type:”POST”, // Get the admin ajax url which we have passed through wp_localize_script(). url: ajax_object.ajax_url, action: “submitAjaxForm”, data: myform, success:function(data){ jQuery(“.records”).html(data); } }); … Read more

speed up pagination for huge database

The article on wordpress is interesting and true but I’m not sure what’s it’s purpose. The provided code is for cases when you want to do some action for every post ; it doesn’t help with the pagination on site directly. You may try https://wpartisan.me/tutorials/wordpress-database-queries-speed-sql_calc_found_rows instead, but with million posts, even better would be to … Read more