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.

2
votes
4answers
332 views

Is there any performance consideration when using Custom Post Types?

Consider a busy site with about 10,000 posts divided in 10 custom post types. Custom taxonomies and custom fields are also used on all of them. The main query was modified to include all these posts ...
2
votes
1answer
7k views

Wordpress so slow to load on MAMP

My sites are so slow running on my local machine, with MAMP on Mac. Any ideas of how to determine where the slow down is? It's slower than making changes on my host! Paul
2
votes
2answers
1k views

Conditionally loading JavaScript based on the Advanced Custom Fields in the post

I am building a site/theme where post content is authored in a modular way (mostly, but not exclusively) with ACF's flexible content field. These fields could have JavaScript functionality attached ...
2
votes
2answers
121 views

get_the_foo() in the loop - does it perform another query?

I'm unclear on the get_the_foo() style of functions, for example get_the_permalink(). My main question is: when this is performed in The Loop, is another SQL query executed (besides the original ...
2
votes
2answers
543 views

Efficiency on displaying random authors based on large database

I'm trying to display a list of 5 authors randomly. Here are some solutions I had found: https://stackoverflow.com/questions/5502609/get-authors-randomly https://wordpress.stackexchange.com/a/91326/...
2
votes
3answers
649 views

Uploading images to Media Library fails with Memory Exhausted

I am trying to upload many hundreds of images daily from a folder on the server to the media library using the following script that is scheduled via CRON: <?php require_once('../../../../public/...
2
votes
2answers
141 views

How often do you need to register_post_type?

Assuming you write a plugin and hook into activation / deactivation to register_post_type is that good enough? Or do you need to do it every init? I'm looking for perf boosts and I want to reduce ...
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())
2
votes
1answer
3k views

WP_Query Performance Issues with meta_query

I'm working on a custom template for a new theme that uses a WP_Query instance to select posts from 2 post types with 2 custom fields that are NOT empty. Depending on the section of the site, a $...
2
votes
1answer
4k views

When Uploading JPEGs, Does WordPress Compress the Original Image?

I'm trying to determine what my image processing workflow should look like. I know WordPress automatically resizes and compresses images to various different sizes on upload. I'm curious if it does ...
2
votes
2answers
326 views

Why are theme templates organized as multiple point of entry PHP files instead of reusing your theme's index.php?

I've started to develop my own theme in the past couple weeks (and extracting WP functionality here and there in the past year), and I'm finding the structure of the WP templates awful redundant. ...
2
votes
3answers
313 views

wp_register_script multiple identifiers?

In order to avoid poor performance with multiple <script> tags I do concatenation of scripts regularly and produce one single bundle.min.js JS file and 'jsbundle' identifier. Problem is, things ...
2
votes
2answers
159 views

WordPress website loads but is not displayed until page scrolled

I have built a WordPress website. It loads without problems until recently, but now I am facing a strange behaviour. The website loads, but nothing is displayed until I scroll the page down, or ...
2
votes
2answers
125 views

Performance impact of using functions in WordPress?

I have a website that generates lots of dynamic contents. I'm facing performance issues even on my localhost, on a Corei7 processor. I've tried to disable every unnecessary plugin, and ran p3 ...
2
votes
1answer
201 views

Prevent five different copies of jquery from being included on every page

Many wordpress theme, plugin, and widget developers seem to think that the only way to use jquery on the page is to include their own copy. On some pages of the site I'm developing, there are as many ...
2
votes
2answers
227 views

Wordpress database becoming huge. How to analyze and optimize it? fear of running out of memory

look at the size of my wordpress database tables: are there simple ways to optimize it? I fear of running out of memory one day maybe bad collation? how can I analyze what is eating up so much space ...
2
votes
2answers
138 views

How to see list of plugins

Is there any tool out there for seeing a list of all the loaded plugins and how much time they took to load? Looking to analyze plugins effect on my site's performance.
2
votes
2answers
669 views

Relationship between performance and database size

What's the relationship between performance and database size in WordPress? Does a bigger DB mean that my site will be slower? My DB size is currently 360mb. I also noticed that I have some tables ...
2
votes
2answers
446 views

Database slowdown after update to 3.4.1

I own a wordpress installation, and Updated to 3.4.1. After the upgrade, I got a very strange slowdown to my wordpress. After all, I used the define('SAVEQUERIES', true); in my wp-config.php with ...
2
votes
2answers
3k views

Improving WP_Query performance for multiple taxonomies

I have a site with several custom taxonomies, and have found that one of the slowest parts of the site is attempting to query with an OR across several of these at once. I'm using a WP_Query like so: ...
2
votes
1answer
2k views

wp-admin slow in multisite

Running Wordpress 3.1.2 (newly updated, installed as 3.0 about a year ago) with subdomain multisite & using the Sunrise domain mapping plugin. The frontend is fast, the backend (wp-admin) is very ...
2
votes
1answer
2k views

Max number of multisites

Does anyone know of any max number of WP multisites or performance issues with having many? Thanks!
2
votes
1answer
40 views

De-registering parent style sheet css recommended?

Just a general question: I am just wondering, why every tutorial for child themes still includes the parent's stylesheet. Would it not be preferable to de-enqueue & to de-register the parent's ...
2
votes
1answer
96 views

What should be disabled to run on an internal network with no access to the Internet?

I am setting up a site on an airgapped (no connection to the Internet) internal network. It is quite slow in loading pages. I have already added define('WP_HTTP_BLOCK_EXTERNAL', true); and define('...
2
votes
1answer
563 views

How to control the order of the combination of enqueued styles and scripts - site speed issue

We know, using wp_head() and wp_footer() all the scripts and styles are enqueued using wp_enqueue_styles and wp_enqueue_scripts hook. What we do is to enqueue our stylesheets and scripts using ...
2
votes
2answers
2k views

Concurrent / simultaneous MySQL connections

I've been looking for the best WordPress hosting for me and I'm wondering how many MySQL connections at once WordPress requires? I know this is kind of general question but how does it look for you? ...
2
votes
1answer
377 views

Does running Wordpress on Nginx do “squat” for its performance?

This article states: If you aren't already using a PHP opcode cache and WordPress caching plugin, nginx will do squat for your WordPress-based website's performance. Could someone elaborate on ...
2
votes
2answers
256 views

The effect of spam comments on hosting resource usage (CPU)

One of my WP sites is using a lot of CPU, and I am wondering if this is caused because of the high number of spam comments it is getting. Can that be the case? Is there an easy way of checking that? ...
2
votes
2answers
439 views

Is using %postname% for permalinks really that bad for performance?

I've seen in various places, including the Wordpress admin and on this page, that using string based identifiers is "strongly not recommended for performance reasons". I understand that looking up a ...
2
votes
1answer
2k views

How much will mounting wp-content on a separate NFS server impact performance?

I'm thinking of using multiple web servers with a load balancer in a big WP install. The database will be on a separate server and that's the easy part. Trickier is files in blogs.dir, and to a lesser ...
2
votes
1answer
39 views

Which has more impact on site performance? Template overrides or hooks

I'm building a website with the "Neighborhood" Theme and WooCommerce. The site is quite large and is heavily customized and I have to set dozens of divs to not display or edit the text, which I'm ...
2
votes
1answer
40 views

Could a higher number of registered image sizes affect performance?

This question is related to this one, but is a bit different. In the layout (archive page) for a Wordpress project I'm working on right now there's a couple of image sizes that do not appear anywhere ...
2
votes
1answer
133 views

How resource intensive is wp_register_script()?

I'm trying to use the has_shortcode() function to only load certain scripts when there is a shortcode in the post's content, with this code: wp_register_script( 'shortcode-js-file' , FILE_URI, array( ...
2
votes
1answer
65 views

Are there Limitations on filter handles?

I was looking through a 3rd party plugin's code today and found them doing this: add_filter('some_base_handle'.sanitize_title($string), ...) Curious, since I was using xh_prof to look for code that ...
2
votes
1answer
17k views

get_the_title($postID) OR get_the_title()?

I would like to know which could be more performant between these two approaches of getting data of a post To use a loop after a WP_Query($aConditions) and use functions like get_the_title() ... and ...
2
votes
1answer
1k views

Too many posts cause slow load when paginating

I have about 10k posts and I made a page that lists all posts but it is paginated every 54posts. It gives 131 queries in 6.730 seconds which is pretty slow to load. Is there a way to make it load ...
2
votes
1answer
64 views

What other plugins are there available to track app performance for wordpress?

I came across this post earlier this year, showing how various plugins affect the performance of a wordpress install, by using a tracker class to measure how long each plugin takes to execute each ...
2
votes
2answers
108 views

How do I know which plugin uses the most resource?

After installing several new plugins I discovered my site is getting slower. Is there a way to know which plugin utilizes the most resource without using the obvious method of activating/deactivating ...
2
votes
2answers
4k views

How do I rewrite a url to use %taxonomy% instead of %category% when multiple taxonomies are present?

I would like to have the option to use taxonomy in the url instead of only having category like "uncategorized." Note that I have multiple taxonomies (countries, states etc), some of which have ...
2
votes
0answers
398 views

Performance issues with large website [closed]

I've been struggling with this website for a while now so any kind of help is deeply appreciated. Server configurations The website is running on a dedicated server from hostgator with the following ...
2
votes
0answers
266 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 ...
2
votes
1answer
344 views

Best settings for MySQL to speed up site? [closed]

What are the best settings for MySQL to speed up a WordPress site?
2
votes
0answers
226 views

Decrease edit.php and post-new.php load [duplicate]

On a new install with default Twenty Fifteen theme and no activated plugins. I used Really Simple CSV Importer to import ~4000 pages with title and one word content for each. This is to have my pages ...
1
vote
2answers
2k views

WordPress performance issue. Can I debug it?

I have a web site, that while working properly, every day, at 11:00am using a huge amounts of the server resources. The web hosting account contains only the WordPress, and I don't have any other ...
1
vote
2answers
843 views

Combining multiple javascript and css files

Is there any plugin which can automatically combine all the javascript and css files that are used on a page? While I can combine them manually I would like to avoid them as some plugins add their ...
1
vote
2answers
255 views

How many caching plugins should be used?

Online researching shows that there are many plugins out there to perform caching on WP. Just to name a few: WP Super Cache W3 Total Cache WP Widget Cache DB Cache Reloaded 1 Blog Cacher Hyper Cache ...
1
vote
1answer
3k views

Universal problem: first request after ~25 second inactivity always slower (~1 second) than subsequent requests (~1/10sec)

It's something I noticed ever since I started working with WordPress. It's a universal issue, in the sense that it doesn't matter if the WP installation is on my shared hosting account (haven't tried ...
1
vote
3answers
1k views

Wordpress shortcodes & performance

Do shortcodes affect performance? each plugin using this technique has to parse post/page content looking for the shortcode? If so, it would be better to limit as much as possible shortcode-based ...
1
vote
2answers
131 views

Why does running get_the_excerpt() when generating JSON file take 28 seconds vs. 599 milliseconds without it?

I am using the following code to generate a JSON feed. I need to extract the excerpt from posts, but when I run get_the_excerpt() it takes 28 seconds (yes SECONDS!) to run on my local server versus ...
1
vote
3answers
726 views

Only loads on the contact template page

In the footer i load the Google maps api. But only on the contact page, i used the google maps api. Now i want to make code. That the google maps api is only load in the contact template pages. How ...