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
55 votes
2 answers
25k views

Ajax takes 10x as long as it should/could

I have just hit my first serious issue with WordPress and for someone that enjoys Ajax this is a biggy. I have an Ajax request that is taking 1.5 seconds to complete while using the Ajax API. If I ...
Mike's user avatar
  • 813
85 votes
15 answers
8k views

Steps to optimize WordPress in regard to server load and website speed?

Besides installing W3 Total Cache or another caching plugin what steps can I take to make sure that my theme and site run as fast as possible.
Paul Sheldrake's user avatar
10 votes
1 answer
8k views

Restricting a Plugin to Only Load its CSS and JS on Selected Pages?

I'd like to cause a plugin to restrict its loading of CSS stylesheets and JavaScript JS files to only those pages for which they are needed. An example for my question is the plugin Contact Form 7 ...
Tal Galili's user avatar
  • 1,833
60 votes
3 answers
12k views

Do deactivated plugins slow down a WordPress site?

Most people are aware that minimizing the number of plugins used is a good way to help keep a WordPress site running fast. However, does that general rule include deactivated plugins?
Travis Northcutt's user avatar
3 votes
3 answers
1k 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 ...
Miloš Đakonović's user avatar
35 votes
3 answers
9k views

How well does WordPress scale?

With the new WordPress and it's new features, it seems like WordPress is capable of much more than a simple blog engine. But how well does WordPress scale being used by say 10k -> 100k users per day? ...
user avatar
13 votes
4 answers
11k views

What is the best caching option for WordPress multi-site on non-shared hosting?

What caching plugin configuration do you recommend and why under the following assumptions: full control of the server configuration running WordPress in multi-site/multi-domain mode most domains are ...
sorin's user avatar
  • 1,123
5 votes
1 answer
2k views

get_adjacent_post alternative on a very large db

I'm using get_next_post and get_previous_post (from the same category) to show the thumbnail and link to the respectives posts in my single template, but it's in a very large db that is giving my ...
davidmh's user avatar
  • 233
3 votes
4 answers
8k views

What are best practices for configuring a server for WordPress sites?

I hired a sysadmin to set up a VPS server for me and, unfortunately, it looks like things were not set up correctly. When trying to install and update plugins, I run into permissions errors all the ...
Adam's user avatar
  • 477
0 votes
2 answers
5k views

How to properly insert a stylesheet in wp_head

I am generating critical CSS for every page and category. At the moment I am inserting the stylesheet through functions.php like this simply using echo. function criticalCSS_wp_head() { if (...
lowtechsun's user avatar
0 votes
1 answer
464 views

Wordpress speed slow after .5 million single image post via wp-cli

I am trying to Creat Wordpress website that will contain 10 Million post, such that when i upload a single its become a post with it's own name as title. and i am importing these images with Wp-cli. ...
Shoabch's user avatar
31 votes
3 answers
6k views

What are the best practices for using a caching plugin on a shared host?

I've launched quite a big site the other day and I'd like to incorporate a caching plugin. The setup is single-site with some Buddypress features mixed in (for user registration, maps with gpress, ...
Amit's user avatar
  • 1,349
28 votes
4 answers
3k views

Could the WP script/style loader be used to concatenate and gzip scripts and styles in the front-end?

WP has a nice javascript loader included in wp-admin: http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/load-scripts.php and a CSS loader: http://core.trac.wordpress.org/browser/tags/3.0.4/...
Alex's user avatar
  • 1,081
17 votes
7 answers
5k views

Profiling a WordPress Website for Deployment on Shared Hosting?

I am having a problem with CPU usage on my website, and am looking for a way to detect (and fix) what is causing it. A topic not covered in this question. Following on Hakre answer here, I now ...
14 votes
3 answers
909 views

Performance of my permalink structure?

I have read the discussion on the performance of different permalinks on the wp hackers mailinglist, THIS forum and around Google. I could however not really deduce if the permalink structure I have ...
edelwater's user avatar
  • 2,574
7 votes
2 answers
1k views

Strategies to implement selective loading of plugins

I'm trying to figure out some kind of mechanism to load plugins on demand, depending on the page url, to improve performance. My primary concern is that I have some admin-ajax.php calls that are ...
He Shiming's user avatar
5 votes
2 answers
2k views

Fastest server stack configuration for WordPress?

If you were configuring a new VPS for a WP website that hasn't launched yet, What technologies would you choose? (website specs below) Website Targeting 50-60k hits /mo. and more The website is ...
SkinnyGeek1010's user avatar
3 votes
2 answers
157 views

Is security a problem in Wordpress?

I am going to start a big corporate website for his car shop which is supposed be more secured. Is Wordpress okay to start a secured and reliable website? As far as i heard, Wordpress hackers ...
Sundar's user avatar
  • 149
2 votes
1 answer
5k views

Stop all SQL_CALC_FOUND_ROWS wordpress queries

In phpmyadmin I often see this query that hangs with a status of "sending data": SELECT SQL_CALC_FOUND_ROWS wp2a_posts.ID FROM wp2a_posts WHERE 1=1 AND wp2a_posts.post_author IN (1) AND ...
user178785's user avatar
2 votes
2 answers
624 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/...
Giraldi's user avatar
  • 1,465
1 vote
2 answers
563 views

I have over 4000 posts, will querying some of them cause performance issues?

I am wondering if querying posts like this: <?php $args = array('numberposts' => 19, 'orderby' => 'rand' ); $posts = get_posts( $args ); foreach($posts as $post) { $...
Tony Fire's user avatar
  • 407
0 votes
1 answer
191 views

Performance and styles not working fine after changing permalink structure

Fist I was using default option of permalink and everything was fine (speed is ok, my own created theme is working fine) but now I change default structure to post name structure of permalink now I am ...
Bhuvnesh Gupta's user avatar
22 votes
5 answers
27k 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 ...
ntg2's user avatar
  • 221
21 votes
4 answers
38k views

Slow Query for the wp_options table

I have been tracking the slow queries log of the WP based site (with the default value of the a long_query_time set to 10), and I have noticed that the following query is often getting logged - # ...
Prasad Ajinkya's user avatar
13 votes
2 answers
7k 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 ...
Sunyatasattva's user avatar
9 votes
1 answer
8k views

How can I debug the TTFB in WP?

I'm developing a WP theme, based on _s default theme with WP 4.1.1. I keep getting a TTFB(time to first byte) of 22s, consistently both on the front and back of the site, while on localhost. Here's a ...
Narayon's user avatar
  • 291
7 votes
5 answers
3k views

Why is home (a lot) slower than other pages?

I'm trying to tune a wordpress website which suffers slow loading times, and I found out that the home page seems to take a lot more time to load. It's not due to content because I'm just considering ...
Matteo Riva's user avatar
7 votes
2 answers
3k views

Localized WordPress is much slower?

I'm using xdebug and webgrind to profile my WordPress installation because it's a bit slow. As there are some 20 plugins activated, I figured xdebug will be able to find the bottleneck. However, to ...
He Shiming's user avatar
6 votes
7 answers
8k views

Long Waiting Times on GoDaddy? [closed]

I prefer not to use GoDaddy because I always encounter performance issues. However, one of my clients is rather insistent on using them... so we are. I've tested this with a vanilla Wordpress 3.0+ ...
Garrett's user avatar
  • 270
6 votes
4 answers
10k views

How many posts can I have in a WordPress website?

I have a feed aggregator and I want will have 2 million posts. I am forced to host the content in order for the posts to show in the loop. A friend stated I need to use a third-party search engine ...
user avatar
6 votes
2 answers
532 views

WordPress database scalability from the code perspective

I have read through multiple questions here on StackExchange that concern WordPress scaling and the common opinion is that WordPress is indeed highly scalable provided you have the infrastructure to ...
John's user avatar
  • 1,449
5 votes
3 answers
3k 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,...
Igor Skoldin's user avatar
4 votes
1 answer
4k views

Wordpress Custom Post Type Admin Page really slow

(I've posted this on the normal stack exchange, but it was suggested that I put it here too. Glad to know this place exists... :)) So, I've been all over the internet trying to figure out what is ...
Programmer Dan's user avatar
4 votes
2 answers
1k views

Stress testing WordPress

We are going to launch a community site with 100K posts, 100K comments, 10K terms, 5 users ( all admin/editorial), and approx 500K recs in the wp_postmeta. Site may grow with a larger author base and ...
Average Joe's user avatar
  • 1,879
4 votes
2 answers
10k views

Any reason why wp_cache_set not to work?

Any reason why wp_cache_set not to work? I have spun my wheels trying to figure out why these are not working. Any suggestions? These functions are supposed to help me cache the results to a key/...
techtransferportal's user avatar
4 votes
3 answers
1k views

Performance tips for a large user base [closed]

I’m preparing a site with many users (100.000+). Since the output depends on the current user’s relation to some custom post types and taxonomies a static cache won’t help much. Besides using a ...
fuxia's user avatar
  • 107k
4 votes
1 answer
952 views

Is the theme customizer slowing down my site?

I have built an awesome theme, which is very flexible, because it has 500 settings of different (custom) types in the theme customizer. I generate the live css like it says in the codex: function ...
cjbj's user avatar
  • 14.5k
4 votes
1 answer
6k views

Is it true $wpdb->get_results is faster than WP_Query in most cases?

On my homepage, I have a section where I have to display the last five featured posts, where a featured post is simply a post with a custom field is_featured set to 1. I achieved what I want with two ...
WPRookie82's user avatar
4 votes
2 answers
4k views

Post ID At The End Of Permalink URL Effects Performance (Positively)?

HARD NOTE: This question is solely about performance, and NOT search engine optimization. So, please make sure your answers are as such. W.r.t permalinks, "year" is the most obvious numeric of choice,...
its_me's user avatar
  • 4,511
4 votes
2 answers
929 views

Use override_load_textdomain for cache translation and improve performance

I have a multisite wordpress with multiple localized sites (es_ES, de_DE, it_IT). I want improve page speed by caching wordpress translation file. My code works (inspired by Tristan Darricau)! and ...
ar099968's user avatar
  • 295
3 votes
1 answer
5k views

Website Loads Twice Unnecessarily

When I use tools.pingdom.com, I can see that my website is loading twice unnecessarily. The first time www.junkluggers.com is loaded, a cookie is set. Then part way through the loading process, www....
Jason Hartley's user avatar
3 votes
1 answer
95 views

What is best way passing variables to theme templates and using them different places like widgets?

I have a template file at /parts/template.php which contains a post listing code like, echo get_the_title(); //same lines with my_render_function and i am using it at archive.php with this lines. ...
Ajna Sarut's user avatar
3 votes
2 answers
524 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 ...
jgraup's user avatar
  • 9,744
2 votes
2 answers
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 ...
Adam's user avatar
  • 477
2 votes
2 answers
216 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 ...
Johansson's user avatar
  • 15.3k
2 votes
2 answers
2k 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())
laggingreflex's user avatar
2 votes
2 answers
3k 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 ...
Arash Rabiee's user avatar
2 votes
0 answers
98 views

Opening specific posts on WP takes lot of time and freezes the editor

I have this weird problem in the last couple of days where it takes ~5 minutes to completely open some posts on WordPress wp-admin dashboard. Please hear me out carefully. This is happening only with ...
Yash Wate's user avatar
1 vote
2 answers
385 views

Localization / textdomain is slow and chaotic

My theme has a lot of templates. Most of them contain messages in the usual way: echo __('This is the message','mytextdomain') This has several disadvantages. For instance, if I want to change the ...
cjbj's user avatar
  • 14.5k
1 vote
1 answer
969 views

Pros and cons of using [taxonomy name] in place of [category name]?

We are currently in development on a new site. Categories (& tags) are pretty much meaningless for us because we've implemented custom posts & taxonomies. By default, because I have enabled ...
Adam's user avatar
  • 477