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 [performance]

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

3
votes
0answers
105 views

Combine JS and CSS for WordPress admin

I am using W3 total cache which allows me to combine JS and CSS in the forward facing site, but is there any way I can do the same for the admin/backend/dashboard area. I can't think of a technical ...
2
votes
0answers
263 views

How can I measure the performance of any WordPress Plugin or Theme?

There are many WordPress plugin or themes with nearly same functionality and features but, how can I measure the performance of any plugin or WordPress theme other than using P3 profiler plugin? I ...
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'...
1
vote
0answers
42 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
114 views

Preload Cache for thousands of posts may be on non-production environment

I have a setup of three wordpress environments: Local: My Development machine (using docker) Staging: An AWS Free Tier EC2 machine Production: An AWS Free Tier EC2 machine I use git/git-hooks to ...
1
vote
0answers
29 views

Performance optimization of tree like structure

I have a category page as below: and when a category is clicked, using the following code $sql_categories = $wpdb->prepare ("SELECT * FROM ".$wpdb->prefix."wtd_art_categories WHERE Parent = %...
1
vote
0answers
33 views

Should wp_query automatic meta and term cache priming be used in an enviroment with an object caching

This is kind of followup question to Explanation of update_post_(meta/term)_cache which discusses the disabling of automatic meta and term caches by setting to false both update_post_meta_cache and ...
1
vote
0answers
139 views

XMLRPC slow and weird websites/services

I have a relatively new wordpress setup ~1mth old after installing NewRelic, I notice it tells me XMLRPC.php is causing slowdown. When I looked at the details I notice its connecting to some weird ...
1
vote
0answers
663 views

Loop Performance > JSON files vs. WP_Query vs. REST API

I've a site that uses just about a bazillion complex loops...in many instances. For many said loops, I found myself using WP_Query to create an array only to use another WP_Query ad-almost-infinitum ...
1
vote
0answers
286 views

How do I join a $wpdb query with user meta using default value if not exist?

I am implementing a new feature to a website which gives users a certain amount of credits every week, if they are of a certain membership level. We are using Paid Memberships Pro and MyCred. Both ...
1
vote
0answers
52 views

Is it possible to make Wordpress PHP faster through caching or compiling it?

With a Profiler I've realized that a single page wp-admin/admin-ajax.php takes 7 seconds to load because of the installed plugins. I'd like to strongly speed it up. I was thinking of object caching ...
1
vote
0answers
131 views

Identify running process that constantly use 5% CPU

I have an instance of WP that use 5% constantly of CPU. I try to identify that process, but when I run "top" command on my ubuntu, I can only tell that php7-fpm is the process which gives me this ...
1
vote
0answers
125 views

Can I use plupload multiple queues in wordpress?

I have a frontend upload form where users can upload images for their posts and I am using Plupload for it. Since the next upload only starts once the previous upload is finised and the preview ...
1
vote
0answers
24 views

Terms showing up in object cache on unrelated pages

This is perplexing. I'm running Debug Bar on my dev site. I noticed today that the object cache reporting shows memory taken up by terms I've created using register_taxonomy when not on pages ...
1
vote
0answers
249 views

Debugging high CPU usage during periods of inactivity

I'm running WordPress within Docker containers and seeing high CPU usage (40%+) at recurring intervals for about a couple hours. This is a very simple site with very little plugins and minimal CRON ...
1
vote
0answers
200 views

Alter wp_post table vs. post_meta performance/speed

I'm searching for the most efficient way to link a post to multiple users. By default each post in wp_post has a post_author column, which is linked to the corresponding user ID in wp_users. Assume ...
1
vote
0answers
284 views

Slow wp-admin due to “SELECT DISTINCT post_mime_type FROM wp_posts WHERE post_type = 'attachment'”

The media library on a large site is slow in wp-admin. I did some research by looking into slow queries in the sql and found that this query is causing the slow response: SELECT DISTINCT ...
1
vote
0answers
1k views

High CPU usage on 404 errors

After debugging high CPU usage for a week, I've discovered that URLs submitted to my WordPress site that result in 404 errors cause high CPU usage. I tested my site with jmeter. When I request a file ...
1
vote
0answers
100 views

How to analyze wordpress plugin performance

Is there any plugin that I can use to determine the performance of the plugin that I'm writing? I'm currently checking out the following plugins to determine any problems that might cause low ...
1
vote
0answers
2k views

how to use shortinit in wordpress

I want to load a minimal resources in Wordpress because the server that I'm working on is very slow. I tried defining short init in the wp-config file: define('SHORTINIT', true); But then I got ...
1
vote
0answers
216 views

WordPress plugin overloading with tmp tables

I have asked at the plugin's (WordPress Popular Posts) support a few days ago, since no response hope to get some insight or help here. Thanks. Hesitant to tweak settings like max_heap_table_size &...
1
vote
0answers
137 views

How to increase load time of an archive/search page (WP_Query)

I'm currently looking at why the archive and search pages take so long to use, and have found that the bulk of processing time is spent on the query_posts that is called before the template has even ...
0
votes
0answers
13 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
0answers
9 views

How to stop my popups from loading before opening them?

My popups each has a gallery full of pictures, which is all downloaded the time you enter the website. Which makes my website very heavy. i use the "popup builder" plugin, which doesn't has that ...
0
votes
0answers
39 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
0answers
27 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
0answers
11 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
0answers
18 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 ...
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 ...
0
votes
0answers
63 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
0answers
26 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
18 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
55 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 ...
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
11 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 ...
0
votes
0answers
11 views

What cause OpCache speed fluctuation?

My testing website is suffering from TTFB speed fluctation which i belive is caused by OpCache, When OpCache is turned off the TTFB speed become steady between 1500-1700ms however if i turned it on ...
0
votes
0answers
17 views

get_template_part calls amount and performance?

I'm trying to build the theme that is easily customizable by other developers and chose to go get_template_part route so files can be easily overwritten in child theme. My question is there some ...
0
votes
0answers
36 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
52 views

Why is one specific admin account hanging on the Posts page?

A client told me that one of their admin accounts wouldn't load the Posts page. I tried it myself and experienced the same issue (it hangs for almost a minute, then throws a 502 error). Strangely, ...
0
votes
0answers
40 views

Wordpress vs. best practices from webhint.io

I've recently scanned my website and some showcase websites with webhint.io* and noticed that they all do have a lot of hints in common. To give a few examples: 'content-type' header charset value ...
0
votes
0answers
298 views

WP_Term_Query->get_terms() very slow query for WordPress filter

My first site is almost done, but I am unhappy with how slow the filter-drop downs are populating. My site is for auto-parts so I have many categories with sub categories (Parts -> Type -> Make -> ...
0
votes
0answers
51 views

REST api v2 how can modify respond types and make custom DTO for better performance

I using REST api v2 and its respond is about 1MB for one request (10 items) and it takes about 6 ~ 11 seconds that very bad. In my web site there is long articles that written in Persian that stored ...
0
votes
0answers
699 views

Serve cookie free URLs in WordPress without using a CDN

I ran a GTmetrix test on my site (example.com) and got a very low score (50) for "coockie free domains". I gather from this error that the webpage of each URL of my domain is served with cookie ...
0
votes
0answers
39 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
59 views

is using “require_once” in wordpress theme affect the speed ???

I am working on a framework to make my workflow faster like a starter theme plus boilerplate. so one of main parts that will make the work faster is the plurality ... I for example in function.php ...
0
votes
0answers
66 views

Calculating efficiently on large amount of data generated by wp_query

I'm looking to make a series of calculations run more efficiently (my current solution takes 40 seconds for page load!). I have a site with 40,000 posts - each of which have the following custom ...
0
votes
0answers
55 views

The WP_Widget class seems to run many times on a page load

I have a plugin that extends the WP_Widget class. It's very similar to this example in the Codex: class My_Widget extends WP_Widget { /** * Sets up the widgets name etc */ public ...
0
votes
0answers
246 views

Delete 100+ posts or media files from wordpress faster than default?

The pages are running pretty fast but deleting many (like 25) posts at the same time takes up to one minute. Same thing on the media library - everything is pretty slow. I disabled already all ...