Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [optimization]

The tag has no usage guidance.

3
votes
1answer
180 views

Speeding Up Bulk Post Creation - wp_insert_post & update_post_meta

I am creating posts (variable products) using (wp_insert_post) function. An Example, I have 9 colors, 9 sizes. Which makes 9×9 = 81 total variations for 1 product, which is 81 times below function to ...
1
vote
1answer
1k views

Cleanup: best way to remove WooCommerce comments from the wp_comments table

I am optimizing the database of my site that is using WooCommerce. When I came across the wp_comments table, I found it close to 100 MB in total. It's all filled with WooCommerce order statuses from ...
1
vote
1answer
2k views

How to solve 'Eliminate render-blocking JavaScript and CSS in above-the-fold' content for multiple files?

I get this when I check my site in google insight: Pretty ok right? But I still consider to fix Eliminate render-blocking JavaScript and CSS in above-the-fold content to get a good results on mobiles ...
1
vote
1answer
260 views

fastest replacement DB

What's the best database setup for WordPress for speed and lots of posts (hundred thousands of rows in posts and post_meta tables)? While I can cache as much as I can and optimize my queries/PHP as ...
0
votes
1answer
84 views

Need to optimize wordpress websites on google pageinsight

I am trying to optimize my websites on pagespeed insight. And, for this I have tried lots of speed optimization wordpress's plugins and all have very good ratings by the users. But not even single ...
0
votes
1answer
254 views

How to optimize wp_option table?

My Wordpress website is often going down with the error message "error establishing a database connection" and when I contacted my hosting server, they replied that the query takes a long time(more ...
0
votes
1answer
670 views

Database Queries Optimization with new WP_Query

I’m building (mostly with a self-teaching purpose) a simple plugin to query posts from another blog on a MS network via a shortcode (like [network-posts blogs=”8" layout=”grid” columns=”3"]), but I’m ...
0
votes
1answer
503 views

batch UPDATE autoload value in wp_options table

After running the following query SELECT option_name, option_value FROM wp_options WHERE autoload = 'yes'; I've found I got 1587 autoloading options values, mostly belonging to custom fields values; ...
0
votes
1answer
721 views

Why my wordpress site is extremely slow even being on a powerful EC2 and RDS stack

I have a website and 2 blogs running on an ubuntu server which is in EC2. I have php7.0 fastcgi along with nginx on this server. Out of these 2 blogs, one blog is extremely slow and one is fast. And ...
0
votes
1answer
191 views

Varnish + Nginx for Wordpress is Good?

i m instaling my new server and trying make some good environment for my wordpress so i wanna know if installing Varnish + Nginx is good idea and will speed up my wordpress website or there is other ...
0
votes
1answer
54 views

ordering and optimizing functions

Ive been hard at work trying to build some functions to display products on my site. The prices for these products are calculated based on many variables. I think the first set of functions work, ...
0
votes
1answer
264 views

Combine several CSS files into one

I've been working on a site where specific CSS files have been written and loaded only when required. I would like to combine all those scripts into one single file. I'm not interested in minifying ...
0
votes
1answer
106 views

Recent posts headlines. How to optimize the loop

I'm using this in my page template to display the 20 recent posts headlines from category number 8, 17, 23, 423 <div id="horizontalTab"> <ul class="resp-tabs-list"> <li>...
0
votes
1answer
189 views

Optimizing multiple WP_querys into one call?

I have finished building my website and noticed due to the structure it takes 3 seconds to load the data due to each WP_query bouncing between different post types. I was wondering if I put these into ...
2
votes
0answers
38 views

SuperCache for Custom Templates

I've started creating custom templates. For instance, I wanted a news template for posts that are news oriented. So, I made news.php <?php /* * Template Name: News Article * Template Post Type: ...
1
vote
0answers
44 views

What type of index should I use for postmeta?

I already added a composite index but it still took 5 seconds to finish these 2 queries. SELECT COUNT( DISTINCT( wpp.id ) ) FROM `wpdgls_posts` wpp JOIN `wpdgls_postmeta` wpm ON wpp.id = wpm.post_id ...
1
vote
0answers
28 views

how to solve slow WordPress site caused by attachment_metadata

My WordPress sites starting to become slower by time, after two years they become very slow. I tried many things, such as: improved my DB, used cache plugins (WP Rocket and W3 Total Cache) which both ...
1
vote
0answers
119 views

Query posts without meta preload

I'm optimizing high traffic website. Trying to solve following issue: Site's home page is extremely slow and top showing 100% CPU because of Mysql. After some investigation with Query Monitor plugin, ...
1
vote
0answers
627 views

admin-ajax.php + load-scripts.php hanging for minutes

My issue is that when I do a simple Admin Dashboard change, like updating a post or page, I sometimes wait up to 10 minutes for the request to finish. I have tried restarting the process and my ...
1
vote
0answers
176 views

Cron Job Keep Running in spite of being disabled

I have Cron job issue in two of my sites (both hosted in siteground). It almost runs for every request made to the site I have added following code to wp-config.php file define('DISABLE_WP_CRON', ...
1
vote
0answers
148 views

Least expensive way to get table prefix in multisite installation

I am writing an api that will have to handle extremely high volumes of calls so, in short, I can not afford to load the WordPress core every call. I have no problem building the API to use the ...
1
vote
0answers
135 views

Wordpress backend delay by server side HTTP Request

I had 50 seconds of loading time for my backend in wordpress. I thought it was very strange for a DB to be so slow and I realized with the help of the Query Monitor plugin that the server is making ...
1
vote
0answers
86 views

What would Repair and Optimize Wordpress Database do?

Recently I am getting an error establishing a database connection in a clients Wordpress site. I googled for a solution and an article suggested to enable Wordpress Repairs by adding this to the wp-...
1
vote
0answers
34 views

Any suggestions on how to make this function more efficient or more generally useful?

I wrote this to handle sanitizing all the fields in $_POST before saving them to options and to sanitize and initialize everything before creating the form. You can use the same $soap array to handle ...
1
vote
0answers
68 views

Wordpress problematic caching

I am looking at ways to optimize the speed of a Wordpress website and found that there is a css file containing a ridiculous amount of useless css and was contributing to the site's very slow loading ...
0
votes
0answers
13 views

problem with caching with swift performance lite wordpress login logout problem

I am using Easy digital download to sell online product . the problem is i have enable Shared Logged in Cache option from swift performance lite setting which result really good for page speed . ...
0
votes
0answers
11 views

How can I speed Ultimate Member website?

I have a website with approx 200 members. It has profile setup functionality where a members logins to check other members profile. I set this up using Ultimate Member plugin. The problem with ...
0
votes
0answers
29 views

Wordpress Query optimaization for slow query

I've WP installation with some 120K posts. One of the slow queries that frequently appear at @mysql-slow.log is below # Query_time: 1.744827 Lock_time: 0.000567 Rows_sent: 1 Rows_examined: 635732 ...
0
votes
0answers
12 views

Uncached* Page Speed

I have a woocommerce based website. I'm using WP-ROCKET for caching and i happy with it for cached website pageload is 1second but uncached webpages like search or a new page this pageloads takes ...
0
votes
0answers
6 views

Printing extra scripts before src scripts to optimize minification and page speed

In WordPress a plugin may add extra data to be printed before or after a script when enqueueing a script. Quite a few plugins that we have enabled do this to define for example an ajax URL etc and it ...
0
votes
0answers
15 views

How to optimize backend? Remove unneeded queries on All posts page primary

How to disable tags, categories, authors and date in All posts page? Any post type. In Screen options I have removed everything (author, categories, tags, comments, date) but in reality this doesn't ...
0
votes
0answers
16 views

Does &$this is really disallowed to use anywhere?

I got this message from the validator of plugins from Envato: When creating a callable, never use &$this, use $this instead: I think he may be wrong with his 'never use'. Are we ...
0
votes
0answers
33 views

How to prevent Vimeo duplicate requests?

I've been tasked to optimize a wordpress site (big surprise...) and found that Vimeo embeds duplicates of their player api js file. I would have thought the browser would prevent this but apparently ...
0
votes
0answers
31 views

Is there any way to get all custom posts and all custom terms with it's meta in few queries?

I'm developing a website with a record for me query count. It has 720 Query for the main page. I want to reduce it. The main page structure is like this: ~10 Custom Taxonomy Term Each Term has a ...
0
votes
0answers
32 views

Can lots of tags affect performance?

I'm working on a plugin that will auto-tag my posts (it's for a very specific, single project only). It will apply 6 tags based on the content of the post. Forward thinking, I wonder if the number of ...
0
votes
0answers
13 views

How do you ensure your code is as performant as it can possibly be within the ecosystem?

I've built a framework I'm proud of. 14k lines of PHP clean code, this was all transported into a plugin. My framework offers extensive functionality on the customer support side, boasts great ...
0
votes
0answers
39 views

Combine multiple WP queries into one, and separate posts by tags

Most of my busiest pages have 5 different queries that look something like this: new WP_Query(array( 'category_name' => "cat1", 'tag' => "tag1", 'posts_per_page' => -1, '...
0
votes
0answers
899 views

Generate new image sizes instead of serving scaled images

So https://gtmetrix.com/ will show me images on my Wordpress website that are a large resolution and are being resized via CSS, eg: XYZ.jpg is resized in HTML or CSS from 4207x3665 to 263x229. ...
0
votes
0answers
38 views

Why are the latest visits to my website originating from my own website?

To start with, I don't know anything about coding and stuff. I am here to seek help from experts hoping they can help me resolve the issue. I have a website/blog that runs on WordPress. I have a VPS ...
0
votes
0answers
18 views

How can I stop widgets from re-executing every time I access the logged-in homepage?

I have a few widgets and they're being built-up every time someone accesses their logged-in homepage. I assume this is so that everything works nicely. Unfortunately, this is a tremendous ...
0
votes
0answers
50 views

Above the fold plugin error “The Proxy Cache directory contains n cache entries.”

I've just starting using this plugin with a site that I did not code or configure. I'm getting this error: "The Proxy Cache directory contains n cache entries. This may indicate that auto-capture ...
0
votes
0answers
170 views

Serve resources from a consistent URL GT Metrix

I am optimizing WordPress website speed and i have fixed all other issues mentioned by GT metrix (Website to test website speed) but could not fix Serve resources from a consistent URL. I know there ...
0
votes
0answers
38 views

Number of queries in wordpress

I have 870 queries in 3,216 seconds. Is that normal? What are that queries? How can I reduce that queries? What is number of normal queries. Custom Page: 870 queries in 3,216 seconds. Home Page: 866 ...
0
votes
0answers
57 views

How to optimise this database query?

I need to collect several tables for posts, and this is currently my query: $result = $wpdb->get_results( " SELECT p.ID AS id, pm.meta_value AS text, pm2.meta_value AS ...
0
votes
0answers
53 views

Run command to optimize images after they get uploaded to WordPress

I been playing with jpegoptim on a ubuntu test server and like the result of its optimization, its there a way to run the optimization command to the new images uploaded through WordPress? Im aware ...
0
votes
0answers
28 views

Is there a way to analyze the load time of the functions in a custom plugin?

I have a custom plugin that is adding on average 1 second to the page load time. I thought the code was well written, but clearly not. Is there any way for me to find out what aspect of the plugin in ...
0
votes
0answers
975 views

Optimize WP_Query

For the homepage WP_Query loop, I need to get the most recent 20 articles, specifically to display the page title, excerpt, category, and date. I am doing the following: $args = array( '...
0
votes
0answers
86 views

Most efficient way to list all categories and display a post for each of them?

I'm working on a blog that has around 8.000 posts and 50 categories. The task I'm working on is to list all categories and for each category to show the latest post with a certain custom field value. ...
0
votes
0answers
466 views

Plugins enqueuing jquery in head

I am trying to optimise my site for mobile and enqueued my scripts to be placed in the footer so as to eliminate render-blocking javascript in above the fold content. Unfortunately some of the plugins ...
0
votes
0answers
43 views

admin.php taking 14 seconds

This is a clean install but it has a (relatively) huge database of dummy posts/comments/etc. But even on single-post loads it still takes just as much. Narrowing further down menu.php takes 8 seconds ...