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
0
votes
0answers
15 views

Page flashes/flickers on every page load

I recently started learning Wordpress, and i noticed something quite disturbing: Under most circumstances, every page load would cause parts of it to "flicker". For instance, if i use the generic "...
0
votes
0answers
20 views

Get all top categories, then only 3 posts for each

I'm building a custom homepage that has that structure:  Cat 1 Post 1 | Post 2 | Post 3 Cat 1 Post 1 | Post 2 | Post 3 etc... I know how to get all top non-empty categories, loop through them ...
-1
votes
1answer
14 views

How to make a WordPress blog faster and lighter? [closed]

I have used small resolution images, changed themes but the speed is still long?
0
votes
0answers
12 views

Website having 20+ second load time [closed]

Not my website, but someone asked me to look into for their WordPress blog. I've never touched WordPress in my life, but I consider myself relatively computer savvy, so I thought I'd give it a try. ...
1
vote
0answers
29 views

Mysql + Wordpress is killing my server (huge CPU usage and getting slow) [closed]

I have recently installed wordpress in a production server with 80K fields in wp_users registered, 175K fields in wp_post table and 350K fields in wp_postmeta. Problem is that mysql database is ...
0
votes
1answer
21 views

Performance hit of Inline CSS

I would like an opinion. Does inline CSS hurt website speed performance? Because even though I write all my custom CSS in the theme customization page Custom CSS section, still in some speed tests ...
15
votes
5answers
16k views

get_option() vs get_theme_mod(): Why is one slower?

I've been using get_theme_mod() for some time in various projects of mine. I decided to take advantage of the Theme Customization API in WordPress v3.4 once it was available as I felt it was an ...
0
votes
1answer
88 views

woocommerce image product add a class and data-src attributes

I'm trying to add a class lazyload and the data-src attribute to my product images (woocommerce). I've look everywhere and couldn't find a solution for this. I've try with some plugins, like a3 ...
0
votes
1answer
30 views

Best way to store 1 billion+ posts?

Hey there I am working on a site that collects a lot of data via scraping. For each data created i'm adding it to WP as a CPT. The problem is I'm going to reach around 1 billion rows eventually, and ...
0
votes
0answers
28 views

How can I figure out what is making my Wordpress site so slow?

My site, which is small and only just recently launched, is pretty damn slow when it comes to doing admin stuff. What tools/techniques can I use to help narrow down whether the slowness is due to my ...
0
votes
1answer
28 views

get_the_id, get_the_permalink, and get_the_title all with one DB call

we are trying to optimize a heavy traffic WP site, and am looking for a way to get the data for these three WP functions with only one query, in order to reduce queries & load on DB server: $wpid=...
0
votes
1answer
492 views

wp_get_attachment_image_src() regenerate custom size images everytime

i try to make simple gallery from post's attachment images with custom sizes. i wrote simple loop: $original = array(); $gallery = array(); $gallery_min = array(); $imgs_args = array( '...
0
votes
0answers
30 views

“edit page” not loading

This has been happening for the last few days... Click on edit page. The page turns white, the loading bar starts moving and it looks like it's making progress based on this. By about half way along, ...
0
votes
0answers
24 views

Why is this function so slow?

My client has a WP website, its a real estate site with the properties setup as custom post types. Below is my search query to filter the listings based on a search form, all fairly standard stuff. ...
0
votes
1answer
589 views

Slow wp-cron HTTP requests

My website is very, very slow. Using Query Monitor, I diagnosed slow HTTP Requests, taking up to 40 seconds (usually 12 secs). These HTTP Requests are POSTs to http://website.com/wp-cron.php?...
1
vote
1answer
58 views

Is it better to put CSS in additional CSS or in Child theme styles.css [closed]

By better i guess i mean which works faster when rendering the page. I understand that the additional css editor stores the changes in the database. Does that make it quicker or slower than using ...
-1
votes
1answer
29 views

Eliminate Render blocking CSS?

OK, so I'm really struggling with a 'brand-new' WordPress website. I'm no WordPress developer, I only have some knowledge of HTML, CSS and a very basic understanding of PHP, Javascript and jQuery. ...
1
vote
1answer
23 views

Preload external PHP information

I have pricing that I load from my billing system whmcs to my WordPress website using PHP. I wanted to know if there is a way I can preload it for it to load nicely or cache only that page or ...
0
votes
1answer
748 views

(Xdebug Profiler) Why are there two cachegrind files generated for one page?

When I enable xdebug profiler, open a page in admin, it generates two cachegrind files with almost identical name cachegrind.out.1498219635_761795.crown__minilio_wp-admin_edit_php cachegrind.out....
-1
votes
1answer
16 views

Using <style> tag or inline style attribute?

I have a widget in plugin that will display a list of items <li> and I'd like to add one color to those items as option (color picker)... The question here, do I throw that color as a: <...
0
votes
0answers
40 views

Slow page loads due to WordPress Core Query

I have a page with many posts and every single page load is noticably slow. Hence, I have checked with Query Monitor the culprit(s) for the slow loading time and found that one query in particular is ...
0
votes
1answer
79 views

What can be a solution when my wordpress is extremely slow?

When I was writing a blog article today, I realized that my wordpress suddenly became extremely slow. Until yesterday it'd been working totally fine. To give you some background information, I'll ...
0
votes
0answers
31 views

Optimize WP site for millions of posts

I have a news portal Using WP cms, It has around 90K posts. DB size 2GB. Used Apache, ngnix, WP Memory Limit 4096M, Time 300 Sec, Using CDN :) I am using 2 Dedicated servers E5 2650 V4, 96GB Ram. ...
0
votes
1answer
21 views

Unusual high query of user meta data

We have a WordPress installation with many plugins installed. The site is not that highly frequented (maybe 10-20 concurrent users). I know the amount of plugins comes at a cost of performance. ...
1
vote
1answer
19 views

Including post thumbnail url in loop's post object to reduce number of queries

I'm working now on high performance Wordpress website and it requires me to analyze a lot of queries, caching options etc. I've discovered that if you use get_the_post_thumbnail() even within the loop,...
0
votes
0answers
12 views

using global variables and performance

I use global variables to retrieve all sort of available data, especially $post and $posts, for example in order to retrieve the url of a user from the post loop instead of using ...
0
votes
3answers
1k views

Performance bug - slow DB query

Since 2017-09-26 I have terrible problems with performance on my website. Loading single post or any other page takes even 20s. I've been debugging it it found out, that the problems are DB queries. ...
0
votes
0answers
19 views

Change loading order of blocks

I have a block with a video in WordPress, and the images below it are out of order until the video finishes loading. How do I change the loading order so that the images finish loading before the ...
4
votes
2answers
845 views

WP_Options ID high

I have a site where the options_id field in the wp_options table has grown very, very large. A month and a half after the installation, the auto_increment value is now at over 10 million. While ...
0
votes
1answer
31 views

update_post_meta performance in a loop woocommerce

I have a simple question, I am working on the list order screen of woocommerce and want to add some buttons that via ajax will update some data to the database using update_post_meta. The issue is ...
0
votes
1answer
939 views

Performance testing a WordPress site locally?

G'day, I am a novice in Wordpress development, I have searched a lot but couldn't find the solution. I have developed a Wordpress site and I want to test it on localhost, I want to test the server ...
1
vote
1answer
16 views

Is there a way to append meta data without creating a race condition?

Our site has a lengthy AJAX function that appends content to the user's cart, which is stored as an array in the usermeta table. The function looks something like this: $cart = get_user_meta($userID,...
2
votes
2answers
1k views

Minimal WordPress load for only `get_option` to work (because ajax…)

In a plugin, I use ajax to get_option() which takes much longer than it has to because entire wp gets loaded. How do I set things up so that it (my ajax) loads only what is needed? (get_option())
4
votes
3answers
1k views

Could a large quantity of files in the uploads folder affect performance?

There is a site, where images are not organized into month- and year-based folders. There are more than 20 000 of images in one folder (uploads) now. When I try accessing the folder via a file browser,...
-1
votes
1answer
51 views

Combining JS files to one script

I am trying to combine all JS files - local and third party files. I tried using the following plugins to do the same: Autoptimize: It is just not combining the JS files to one Fast velocity minify: ...
1
vote
0answers
9 views

How to cache a different page version based on HTTP header?

My website has an HTTP response header generated by Cloudflare that contain the visitor country code, and i can use that header in PHP to generate a dynamic content based on the visitor country, now i'...
0
votes
0answers
5 views

Pre-Render next new user page after sending response to client

Is it possible to execute non blocking code after sending response to client? If so, What would be the best way to render a page and store it in memory till next user execute a request, and just serve ...
-1
votes
1answer
36 views

How to improve my site's loading time?

my wordpress site is hosted on godaddy, using flatsome theme, 7 plugin (including img-lazy load & woocomerce). i have use free cloudflare cdn, but still my site need 13+ seconds to load. i have ...
-1
votes
1answer
47 views

How to resolve google page speed issues for wordpress website

My current WordPress website has several issues in Google Page speed test Defer unused CSS I have already implemented CDN and used plugins like WP Rocket(One of the top plugin for WP website ...
-1
votes
1answer
49 views

WordPress and TTFB (time to first byte) stats

I am currently working with a client that last time I checked was averaging 8-9 SECONDS for their TTFB (time to first byte). So as you can imagine they are looking at a 12-14 seconds page load time. I ...
0
votes
1answer
48 views

Slow page Loads When Using Dynamic Coding

I have written code to get certain tags, and then show the products that have those tags. This is the code: $tag_string = ''; for ($i = 0; $i < 8; $i++) { for ($j = 0; $j < 8; $j++) { ...
0
votes
0answers
29 views

Theme header is loaded twice

I've custom theme, and in my header I have SQL query that increase a counter into the database. The problem is it's increasing twice or two different rows(one after another). The problem seems to ...
0
votes
0answers
19 views

Removing the unwanted style sheets and scripts using plugin for improvise the page perfomance

I am already installed the asset cleanup plugin for removing the unwanted css and scripts.The plugin does not contains the bulk unload option without some specific pages and post types. Ex: I am ...
0
votes
0answers
102 views

Wordpress high availability using EFS. Need inputs

I am a WP admin who is struggling with site performance issues usung the below stack AWS spot instances with auto scaling and EFS for WP data. Mounted EFS with AWS recommended settings. Using ...
0
votes
0answers
8 views

Performance Issue with Forms

i'm having massive performance Issues with a Website i'm creating. My user Profiles are quite big, at the moment about 200 fields. The loading times of the page are increasing drastically, at the ...
11
votes
2answers
5k views

WordPress usermeta scaling for thousands of users

I have developed a CRM plugin for a client integrated with WordPress user management and I stored additional information for each user under the wp_usermeta table. However, the client's customer ...
0
votes
1answer
22 views

Does is_admin() really provide a plugin performance improvement?

I have this block in my Main.php class which loads the admin, core and front classes that make up my plugin function registerObjects() { // register the front $controller = new front\...
0
votes
0answers
12 views

Make index.php pre rednered

can I pre-render index.php on server side and make sure my site serves it instead of index.php I want to improve my performance but keeping dynamic capabilities.
0
votes
0answers
13 views

WP Cron regularly causes “Environment health Degraded on AWS”: Happens with HTTP 200 as well as HTTP 500 sometimes

This problem is ocurring regularly and I get dozens of notifications from AWS. Example: Timestamp: Tue Feb 26 17:26:00 UTC 2019 Message: Environment health has transitioned from Ok to Degraded. ...
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 ...