Tag Info

New answers tagged

0

You should not modify the wordpress DB via SQL unless it is a total emergency. Wordpress DB structure getting more complex with time and there are always possible intractions with plugins that you might bypass with direct SQL. What you should do is to write a small plugin that inserts the tags by calling using the relevant APIs.


0

I check your query and it's working fine without any errors or empty results. But in addition if you remove INNER JOIN from wp_terms table its also working because you are not getting anything from that table and it is not used in WHERE clause also. SELECT ID, `post_date` , `post_title` , `post_content` , `guid` FROM `wp_posts` as post INNER JOIN ...


0

What host service are you using? I had the same issue using Dreamhost, where you can adjust the memory limit for the server you are using on the hosts panel. Doing this solved the issue for us. Also, a possible issue could be your SQL server, switching to another SQL server may resolve your issue. Contact your host for more info.


2

This is all depends on what queries do you run on a page, are you using simple or complicated queries etc. There are really no set minimum or maximum amount of queries to a page. You will need to look in context of your site specifically and weigh the amount of queries to what is actually happening on your page. Wordpress can be quite harsh on resources ...


0

Wordpress uses a lot of plugins and is very query heavy but the in spite of that, the front page uses 59 queries to generate itself. I think the default (on a vanilla WordPress install on the default theme) is 27 or something of that nature. The larger the number of queries, the slower the page is going to load and the more load you are going to put on your ...


0

The reverse mechanism should work. I assume you are trying the get post metadata with the post row. $resultat = mysqli_query($con,"SELECT * FROM wp_postmeta LEFT JOIN wp_post ON wp_postmeta.post_id = wp_post.ID WHERE wp_post.post_type='shop_order'"); ...


2

Queries ofcourse. It's faster... But in this case just please delete you wp site and start with something faster... here is my superfast framework for you... <?php /*Your bunny wrote */ I did tests, 0.0000001 runtime vs WP usually 0.7-2.8 Sarcasm off P/S/ This question have no sence since using direct queries and output of the variables isn't use ...


0

You make no attempt to check if the work has already been done. As a result on every page load the work will be done yet again and more posts created. Because of this, when WordPress attempts to run WP Cron, you'll get a second load, and a second run of the code. So do not run this on every page load via the init hook. The URL being fetched takes a long ...


1

The use of wpdb->insert and wp_insert_post both accomplish an SQL Insert, which is why you're seeing 2 records each time. You must use only one instance of an insert method, and then Pass $my_post to WP_Query CLARIFICATION As Milo points out in his comment wpdb->insert will insert into any table, while wp_insert_post is used to insert a post into ...



Top 50 recent answers are included