Questions tagged [optimization]

The tag has no usage guidance.

67 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
1answer
577 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
0answers
20 views

Wordpress Query is taking more then 20 second and stuck on creating index

Hi I need help with below query this query takes around 20 second and when more then one is executed then server CPU usage hits 100% and server stop responding. here is the query from process list. ...
1
vote
0answers
13 views

Delete large original image files (Bulk)

The new way of handling big images introduced in WordPress 5.3 leads to a nice reduction in traffic but doesn't offer any savings regarding storage space (usage of server disk space). A customer ...
1
vote
1answer
35 views

Page taking time in loading. Also used lazy loading but doesn't work?

There are number of logo images and many are shown under show more button. But all are getting loaded at a time. Due to page speed decreases. I have used lazy load plugin but still is taking time on ...
1
vote
0answers
10 views

How to show optimized list of posts with all their attachment images

In page-images.php template I have created this code which displays a list of posts which belong to a category and order them by meta value. So basically it is like a category page, generally nothing ...
1
vote
0answers
214 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
230 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
997 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
42 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
324 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
1answer
2k 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
0answers
162 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
173 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
94 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 ...
1
vote
1answer
270 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 ...
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 ...
0
votes
0answers
9 views

Eliminate render-blocking resources- can w3 total cache be used with auto optimize?

when testing a site on page insights & gt metrix. js & css blocks the main content. Will using w3 total cache & autoptimize toogether or in any case 2 caching plaugin with CDN will solve ...
0
votes
0answers
10 views

How to optimize images that upload to S3 and using Cloudfront as CDN?

my site is using AWS Lightsail service. I am using WP Offload Media Lite plugin to using Cloudfront as my CDN and upload all my images to S3. But I got a problem with the image's size, they are ...
0
votes
1answer
12 views

Will memcached improve performance with WP Super Cache already running?

I'm working on a WordPress site that is expected to host up to 1000 concurrent users, so I'm exploring ways to make it run as fast as possible. I've heard that memcached helps WordPress sites load ...
0
votes
0answers
12 views

Best way to retrieve and show data from API to WordPress

Basically, Our Vendor has a system developed in Yii 1.1, Which provides us data through multiple APIs. I am calling 5 different APIs on homepage, and using foreach loop to display the data on homepage....
0
votes
0answers
29 views

Wordpress + Polylang: translations too time consuming, how to optimize?

I am using Wordpress, Porto Wordpress Theme and Polylang for translation (4 languages). I need to translate all website pages into all 4 languages. The website has around 50 pages. I plan to create ...
0
votes
0answers
21 views

Problem with cache, plugin Litespeed and server Litespeed

I have been using the wordpress Litespeed plugin on my site Trailer y Estrenos CO. I have the Chemicloud hosting and it uses the Litespeed server, which according to them, it works super well if is ...
0
votes
0answers
31 views

Google Page Speed

My website is in Wordpress so I am asking question regarding Google Page Speed here. My issue is i had completed the development of home page of existing page now when i am trying to check the score ...
0
votes
0answers
19 views

Should I use 'tag', 'cat' and 'tax_query' parameters together in a WP_Query?

What I'm building I'm developping a plugin. I'm currently filtering the posts by tags and categories (tag and category_name WP_Query parameters) with values given in a shortcode. I want to add the ...
0
votes
0answers
144 views

How to fix Autoptimize and Cloudflare interaction

Yesterday I was trying to change just one option of the WP Autoptimize plugin (inline and defer css) to avoid it render blocking. This was the process of it: I extracted the critical CSS with an ...
0
votes
1answer
12 views

Can mediaelement-and-play core JS be dequeued?

I'd like to understand what is the purpose of the WordPress core javascript file /wp-includes/js/mediaelement/mediaelement-and-player.min.js I am asking that because it weighs 136KBytes and I'd like ...
0
votes
0answers
76 views

Imagify / Image Optimization for theme inline div background?

I'm using the imgaify plugin to serve webp images. Using their plugin a normal tag ends up looking like this: <picture class="attachment-large size-large wp-post-image"> <source type="image/...
0
votes
0answers
44 views

Wordpress UPDATE queries on MySQL database stuck

I have an Amazon 24XL server 96 Cores 378 GB RAM Database size 5.7G Debian GNU/Linux 9 (stretch) PHP 7.3.16 mysql Ver 15.1 Distrib 10.3.22-MariaDB I have only one WordPress site where users read ...
0
votes
0answers
133 views

wp_options table size grown-up to GBs from MBs overnight

Our host just informed us that our db has reached it's capacity limit and the database has been blocked (It all happened overnight as the DB size was in MBs only and now it's 2 GB). The INSERT ...
0
votes
0answers
59 views

How to optimize wp_delete_post() function, or why it is so slow

I have a code block to delete all the products from a store. This products have several custom fields and some images attached. The code is below: set_time_limit(0); define('WP_USE_THEMES', false); ...
0
votes
1answer
27 views

What is the best way to host a site with many images without it being too slow?

I have a friend that wants me to help them with their WordPress website that has about 150 images for their gallery. Their site is quite slow even after I optimized the images using the ImageOptim app....
0
votes
0answers
18 views

Why does my site download two different versions of the same image?

On both my homepage I have a masonry layout with thumbnails. These are lazy-loaded by JetPack. I noticed that for every thumbnail, two images are being loaded. One with a request url of https://i2.wp....
0
votes
0answers
56 views

Is there a better way to resize and compress/optimize images without using a plugin?

Images resized through Wordpress' add_image_size function seem to be notoriously blurry and too heavy (file-size-wise): When I compare the outcome of manual resizing of a JPG image with OS X's Preview ...
0
votes
0answers
57 views

Reusing old post IDs

When I exported my posts I noticed that some of the ID numbers were missing e.g. it started from 8 and went to say 21 and then from 24 to 30 etc. Is it possible to reuse IDs 1-7 (or any others that ...
0
votes
0answers
126 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
17 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
183 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
1answer
181 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
0answers
33 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
80 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
2answers
1k 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
0answers
46 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
62 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
550 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
45 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
100 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
2answers
47 views

Is it inefficient to repeat a Shortcode 100 times on a page?

I've been using shortcodes for cutting down on the amount of html I have in my visual editor. I have a shortcode [person] with features name, age, location, phone, and description. I want to list my ...