Questions tagged [performance]

Writing efficient code leads to better performance of a site, which is usually measured in the speed with which pages are served.

Filter by
Sorted by
Tagged with
1 vote
0 answers
44 views

Speed up / Optimize Admin Edit Post Page on Large Websites (50-150k posts, 50 custom fields per post)

I'm working with a set of large Wordpress installs with 50-150k posts, each with 40-50 custom fields. The installs are very basic, with limited plugins (less than 5), and a default Wordpress theme (i....
user avatar
  • 661
0 votes
0 answers
26 views

Improve performance of slow query

I'm using this query to obtain all the products buyed by user and works but query monitor says me that is a slow query (above 0,5 sec), there is a way to fix this? Here the db query: $result = $wpdb-&...
user avatar
1 vote
1 answer
17 views

Fastest way of counting posts of a custom post type in a specific taxonomy term?

I know this kind of question is legion but I have read through all related topics and I can't find a satisfying solution. What I want to achieve is simple: on my taxonomy (author) term archive page I ...
user avatar
0 votes
0 answers
63 views

Can/should we delete wordpress cron jobs with no action?

I find myself during a website creation where I try several plugins and delete them afterwards. However, some plugins do not clean their cronjobs and are left to be executed with no action. My ...
user avatar
1 vote
1 answer
22 views

Looking for most performant way to execute several similar WP queries within shortcodes

I have a very data-driven website where each page contains several (5-10) shortcodes, each of which execute WP queries and display the results. The queries are usually quite similar - I've added 3 ...
user avatar
0 votes
1 answer
16 views

Disabling ajax code that does a POST request that ends in a 400 error code

I have a javascript snippet that sends a POST request, but the backend no longer serves that request. Would removing that code significantly improve the website performance? The problem is that the ...
user avatar
  • 1
0 votes
1 answer
23 views

Does fixing PHP notices improves website performance?

$geolocation = esc_sql($_COOKIE['geolocation']); I have this, and using Query Monitor, I've been able to find out that this notice is being thrown out 490 times on the home page alone, so I am ...
user avatar
  • 1
0 votes
1 answer
99 views

Which is faster wpdb & get_row or wp_query & ge_post_meta?

Im planning to make a private api and i was wondering which one should i use go for my datas. wpdb & get_row with my custom sql regular wp_query & get_post_meta() Im wondering if it's better ...
user avatar
0 votes
1 answer
34 views

(Wordpress 5.8.3) Function.php or a plugin for better performance? [duplicate]

I'm working on an e-commerce site and a lot of customization needs arise. There are many codes in the child theme. Hundreds of lines... I always have this question in my mind: Is it better to write a ...
user avatar
0 votes
0 answers
24 views

How do you make a site load faster when offloading is not an option?

I have a website where I can't offload it any more, and it still loads some pages slow. Those pages are ones that can't be cached, like the cart or the checkout (Woocommerce). I have tried 5 different ...
user avatar
0 votes
0 answers
29 views

Wordpress Admin extremely slow when other admin logged in

The sites has multiple authors/admins, who may sometimes edit/publish posts at the same time. Whenever more than one user is author/administrator is editing/publishing another post, the WP Admin ...
user avatar
  • 101
0 votes
1 answer
38 views

Pass debug_backtrace() in Wordpress filter

As you know, debug_backtrace() function has a large output. I need to pass it in my filter. $meta = apply_filters( 'filtername' , $meta , debug_backtrace() ); Does this have a big impact on site ...
user avatar
  • 125
0 votes
1 answer
40 views

Puzzled at HTTP/2 301 response header

I am running curl -I https://padelove.gr/cart with the https:// part prepended explicitly, and I am noticing that the response header is about an HTTP/2 301 redirect on the very same URL. Shouldn't ...
user avatar
0 votes
1 answer
27 views

"Disable" specific plugins on certain pages

I want to disable specific plugins on specific frontpages, but not "disable" them in the backend, i.e. really disable them in the DB. Just NOT load them, as if they weren't installed. Did ...
user avatar
  • 152
0 votes
0 answers
11 views

Changing WP Object Caching during runtime

If I an external object cache (provided by W3TC), but in specific usecases use wp_using_ext_object_cache(false) during Runtime somewhere in the middle of the WP page - Does this change during effect ...
user avatar
  • 152
2 votes
2 answers
76 views

Changing BIGINT to INT

We have a WP page running with a Buddypress network, which is highly dynamic. We are trying to identify every possible opportunity to reduce load and storage - and found that quite some tables use ...
user avatar
  • 152
-1 votes
1 answer
38 views

Is there a way to pass google webmaster CLS on WordPress website?

I have developed WP theme for 3 webisites. Both are using pure WP codex code. No frameworks, nothing. The only thing I use is WP bakery PB plugin. But still it is not passing the CLS. I am switching ...
user avatar
  • 39
0 votes
1 answer
509 views

Disable lazy loading on specific images

Wordpress adds lazy loading on all images. Lighthouse recommends disabling lazy loading on images in above the folder. I would like to figure out how to disable it only on images that I call with ...
user avatar
1 vote
1 answer
27 views

Does using WP-cron make the site slower for the user?

Forgive my "beginnerness" in this matter but I have 2 options to trigger a heavy task (massive update on users' properties to solve an issue between 2 plugins that weren't meant to cooperate)...
user avatar
  • 11
1 vote
1 answer
38 views

WP Optimization: Removing Orphaned wp_options (especially the autoload ones)

Is there no mechanism which purges old options from the DB? I tried a few plugins in the past and I found out that there are a few pretty long option strings which are set to autoload but IMHO not ...
user avatar
  • 152
0 votes
0 answers
15 views

Is there any difference between widgets (used in order to manage menus) and register_nav_menus() in terms of performance?

I plan to add in the footer of my website 4 menu areas (such as "About us", "Services", etc.), each area with 3 or 4 links. In terms of performances, should I use widget ...
user avatar
  • 95
1 vote
0 answers
225 views

How to preload images through Code Snippets wp_head for specific pages?

Circumstances: Website Structure My Wordpress website is used as presentation and portfolio for my graphic design services. Visual impact is important for me, so most of my pages contain big ...
user avatar
  • 33
1 vote
0 answers
67 views

Multisite with 220+ sites painfully slow

We’re having issues with the site being painfully slow. It can take anywhere from 6 second to 20 seconds to login. The odd thing is that this only seems to happen with the Super User account that has ...
user avatar
  • 11
1 vote
0 answers
28 views

Control panel loads slowly due to 2 slow queries on comment table

Our WP site’s control panel loads very slowly. Analyzing this with the Query Monitor plugin, I see that it is slowed down by two queries, both on the comment table. First one: SELECT comment_approved, ...
user avatar
  • 11
0 votes
1 answer
46 views

Is there anyway to split posts to different databases?

We have a huge database (4GB) and mostly are wp_posts wondering if is that possible to like, split it to two different databases to have better performance? for example, split post types with PRODUCT ...
user avatar
  • 323
0 votes
2 answers
57 views

is there a way to preload specific images for desktop users only? (excluding mobile users)

My website has a few .PNG images animated at the very start of my Contact page. Those images are a bit heavy (because they have transparent background), so the animation starts with some of them ...
user avatar
  • 33
0 votes
1 answer
33 views

Deleted Image giving a 301

I have images that were deleted from the site (the page and the media library) but are still being requested which can be seen in the network tab. They are redirected and take a huge amount of time ...
user avatar
  • 1
1 vote
1 answer
47 views

Why a URL with a query is always slower than that without a query?

I find a strange thing. For a WordPress site, a URL with a query is always slower than that without a query, even no Cache plugin is installed/enabled and no CDN cache is enabled. For example: http://...
user avatar
  • 41
0 votes
1 answer
28 views

Plugin has added weird data in wp_options, set to autoload

I am new to learning out about autoload in wp_options and performance issues. So exploring one of my sites I find a plugin has added a bunch of data in a wp_options field which appears to be blog ...
user avatar
0 votes
1 answer
26 views

url_to_postid method in walker_nav navigation menu causing exceptionally high TTFB

I am using the walker class to create my custom mega menu, and using it to display post thumbnails at a menu depth of 2. It seems using the url_to_postid method seems to be causing a high ttfb of >...
user avatar
1 vote
1 answer
141 views

Sample -- test -- data for large WordPress install

I'm working on a plugin, Index WP MySQL for Speed. For testing it would be helpful to have a very large WordPress installation containing many thousands of posts, pages, metadata entries, media items, ...
user avatar
  • 437
0 votes
0 answers
28 views

Google Fonts gets loaded both local and external

I'm optimising my Wordpress website to handle Google Fonts. I use... Wordpress 5.7.2 Elementor (Disable default fonts = enabled) Astra theme (Load Google Fonts locally = enabled, preload = enabled) ...
user avatar
1 vote
1 answer
38 views

Use more than one query, but prevent duplicates - at scale!

Setup I have a Gutenberg block (made with ACF), which lets users define certain conditions (e.g. this tag or this date, and a number) to display posts matching these conditions. E.g.: "Show ...
user avatar
  • 68
0 votes
0 answers
218 views

How to cache a custom API call?

I build a little Python API and would like to cache the responses for 24-hrs. As I use it in a shortcode like [google keyword="example"] it will always do the API-call once I open the ...
user avatar
1 vote
1 answer
175 views

How to load plugin after page is loaded - pagespeed issues

is there a way to load a plugin, after the whole page is rendered and fully loaded? I have horrible pagespeed according to Google and webpagetools. One plugin (provenexpert), is loading several fonts ...
user avatar
1 vote
1 answer
78 views

I'm designing a plugin to create database indexes. Suggestions?

I'm starting a (totally open-source) little project to create a WordPress plugin that will add appropriate indexes to WP's MySQL tables to improve performance. (Some wp tables, notably wp_postmeta and ...
user avatar
  • 437
0 votes
1 answer
35 views

How do I make content only load on desktop? [duplicate]

In order to improve the performance on mobile, I want to load some of the content on one of my sites only on desktop (this is content that is also not clicked on mobile). If I simply hide it via CSS, ...
user avatar
0 votes
0 answers
47 views

How to remove Unused CSS From a WordPress Theme?

I used a premium theme from ThemeForest & Elementor Page Builder. There are lots of Demo Theme provided by the Main Theme. I used only one. But in my style.css, I am watching 45000 lines of CSS. ...
user avatar
0 votes
0 answers
25 views

Check if almost 10 year old - working code is up to date

I found the following code and tested it on my site. Works fine. But im not sure if the code is up to date because the last few years so much has changed on wordpress. Thx for your feedback and ...
user avatar
  • 131
0 votes
1 answer
140 views

Timezone is wrong when picking city (Copenhagen)

The timezone-setting (in 'Settings' >> 'Generel' >> 'Timezone'), seems to be ignored. I've set it to be 'Copenhagen' (value: Europe/Copenhagen). But the servers time is still 1 hour ahead ...
user avatar
  • 608
1 vote
1 answer
39 views

Improve wp query perfomance on large db

I have 100000 records in my database and so many meta query performed on it so it takes lot of time to perform the operation, what is the way to speed up this? It takes 20 to 25s to load this query. ...
user avatar
0 votes
1 answer
52 views

how to embed Pdf and Video Without effecting page speed?

I have a WordPress site and I upload a lot of pdf and videos use embedding techniques but now my website speed is very low. so i want to increase the page speed now, I am going to delete all the ...
user avatar
0 votes
0 answers
23 views

Profiling the initial PHP file, anyone, that get like 10 seconds to load

I got a Worpress to improve, locate on a shared cloud server where we do not have so much control (cron jobs, and a limited cPanel) thing is, that whatever page I call, it takes like like 10 seconds ...
user avatar
0 votes
0 answers
79 views

How do you measure the PHP generation time of your Wordpress pages?

I'd like to measure the PHP page generation time for my Wordpress sites, preferrably without any plugin. Which PHP files would you edit to do this? I was thinking about adding this in index.php: <?...
user avatar
  • 87
1 vote
0 answers
40 views

TTFB increased for no reason

I am developing custom theme based on underscores and gutenberg block plugins based on @wordpress/create-block. Suddenly, I observed slowdown in server response, it went from ~400 ms to ~750 ms. I ...
user avatar
  • 416
2 votes
2 answers
49 views

WordPress web page struggling with performance

I have some experience with building wordpress pages but me and my friend are starting an e-shop, we wanted to have everything perfect without any bugs and problems so we decided to hire a freelancer. ...
user avatar
0 votes
1 answer
157 views

Change WooCommerce product and variation prices programatically without affecting performance

I need to set a global 5% discount (or 0.95 margin) for all logged in customers on my store. I've used filters to alter the price for all simple products and product variations. To get it working ...
user avatar
0 votes
1 answer
245 views

Remove unused CSS and JS

I got this recommendation from google pagespeed tool, my pages works fine for desktop but for mobile it gets a score of 60. check the report here. I removed the css and js files manually from https://...
user avatar
1 vote
4 answers
484 views

Async Loading of Custom Posts

I have a wordpress page template, where I'm loading custom posts. The code for fetching these custom posts looks as follows: template-parts/content-page.php <article id="songs"> &...
user avatar
  • 31
1 vote
1 answer
37 views

It is a good idea to store values from the global $post if they are used multiple times?

I am wandering if it is a good idea to store values from the global $post if they are used multiple times like in the example below, or is having no effect on performance? $post_id = $post->ID; ...
user avatar

1
2 3 4 5
12