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.

1
vote
1answer
238 views

Is it better to assign functions like get_the_id() to a variable if it's used multiple times?

If I call get_the_ID() multiple times throughout my file, would it be better performance wise to assign get_the_ID() to a variable? // Call get_the_ID() directly function_that_needs_post_ID( ...
1
vote
2answers
93 views

Overwriting templates in child theme and performance

Is it bad for performance to overwrite custom templates in the child theme? For example: I have a template called single-music.php in my parent theme. I have put single-music.php in the child theme ...
1
vote
1answer
748 views

Filtering by Post Meta Custom Fields - Performance

I could use some advise on how to structure my data for performance. I have a custom post type with a lot of custom meta data stored in the wp_postmeta table as a serialized array under one meta key ...
1
vote
1answer
92 views

Image Preloading

Why does WordPress pre-download every image/icon/etc? Running my website through the tester at http://tools.pingdom.com/, I can see that it is downloading a bunch of icons and image files that ...
1
vote
2answers
1k views

Poor performance on multisite install

I have my multisite site up and running the main site is mikewills.me. The big problem I am having is performance. It can take several seconds before anything starts showing up. Obviously, this is ...
1
vote
1answer
55 views

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

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
vote
1answer
22 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 ...
1
vote
1answer
95 views

Performance impact of using global $post

I have two functions that do the same action: they add a title prefix for expired posts. Which of these functions will affect more the site performance? function expired_facebook_events_title_prefix_(...
1
vote
1answer
71 views

Which is more efficient? Using usermeta, or creating a new MySQL table?

I'm building a bookmarking feature, allowing users to place a marker inside a blog post. The data will then be saved in the database, and retrieved upon opening that blog post. The same concept can ...
1
vote
2answers
425 views

Is 30 posts/sec considered slow for wp_delete_post?

I have about 90,000 posts in my WordPress and want to delete most of them using a plugin. I fetch all IDs from the posts that need to be deleted and then do the following: // $delete_posts contains ...
1
vote
2answers
718 views

Is using WP Transients to save external data for a plugin the best/right way?

I am developing a plugin which relies on external data to be fetched from time to time. To speed things up, I´d like to cache the received data and refresh it in intervals of 10 or 15 minutes. This ...
1
vote
1answer
701 views

WP_Query times out

I have a form with 20 inputs that runs WP_Query and recieves results via ajax. For some reason: query gets considerably slower when 5+ inputs are filled It takes like 10 - 15s with 7 input values 15 ...
1
vote
2answers
4k views

PHP 5.5, w3 Total Cache, and opcache [closed]

PHP5.5 has ZendOptimizer opcache built in and it seems to work pretty well and the benchmarks seem to give it a slight edge over APC in performance. Great. So APC seems to be on its way out. My ...
1
vote
1answer
4k views

Using get_bloginfo('template_directory') or variable - performance issue

Can I please ask you about the performance of these two approaches in term of execution speed and server load? approach 1: <img src="<?php echo get_bloginfo('template_directory'); ?>/data1/...
1
vote
2answers
2k views

Large Number of Wordpress Posts

I am in process of setting up a catalog website and it has some 1.5 Lac products. I will write some script to import all the products but I am not sure whether WordPress will be able to handle such a ...
1
vote
1answer
664 views

Too Many Pages in Wordpress? 2013

I've read a few threads both here and elsewhere about Wordpress having performance issues once a certain amount of pages have been published. But, most of these threads are at least a couple years old,...
1
vote
1answer
499 views

One post carries 30 postmeta values, is this too much?

I have some data saved as post meta, occasionally some plugins may save an extra piece. Now I installed bbpress, it saves at least 10 pieces of post meta. Adding them together, there are nearly 35 ...
1
vote
3answers
1k views

Multiple social buttons with a fast loading? [closed]

I have pages like this with a lot of social buttons. A lot means more than 50 buttons because each posts on that page has its own buttons. So maybe I'll make the page smaller, with less posts but ...
1
vote
1answer
566 views

Optimizing Jetpack for Wordpress [closed]

Yslow reports following issues with Jetpack: 1) Compress http://stats.wordpress.com/e-201219.js using gzip 2) Configure etags for http://stats.wordpress.com/g.gif?... Modified the format so that it ...
1
vote
2answers
853 views

Removing translation textdomain

I am working on a plugin for myself, so, it's totally useless to load textdomain. But most of codes I copied from others are using the __(' ','') I copied the codes from several plugins. So, even if I ...
1
vote
1answer
174 views

Wordpress site is sloooow, but admin is fast…any ideas?

I have a Linode VPS running a single Wordpress blog. It has been running just fine until today. The admin panel is snappy, but the site is very slow. I am still finishing the site, so there shouldn't ...
1
vote
3answers
361 views

Performance on WPMS

my WPMS site is hosted on 8 cores/32mb RAM server but the response time is very high. We have about 1000 blogs (35,000+ tables on single db) and 70,000 pageviews per mounth. I think that i can down ...
1
vote
1answer
541 views

WordPress Scalability - One Instance or Several?

My company is currently outsourcing development of 170 WordPress sites and I recently learned that they are developing all 170 in one instance of WordPress. I am not a WordPress expert, but have seen ...
1
vote
1answer
526 views

admin-ajax.php slows down, but cant figure out which plugin

admin-ajax.php slows down, but cant figure out which plugin. Tried to follow these steps: https://woorkup.com/diagnose-admin-ajax-php-causing-slow-load-times-wordpress/
1
vote
1answer
733 views

Why can't /wp-login.php be load balanced?

I've seen several questions posted but they either blow passed this specific item or go unanswered. Basically, I have a load balance set up between two instances of the same wordpress website with ...
1
vote
2answers
42 views

AWS (or others) vs VPS

Currently, we are running our WP based website at dedicated OVH web hosting with the highest performance. Due to fact that traffic at our website continuously grows, we are about to migrate to the ...
1
vote
1answer
801 views

Do I manually minify css code in my main theme or child theme?

WordPress developers, I am using a child theme for my DIVI WordPress theme. I want to use a Minify CSS tool. Do I first copy all the code from my main theme style.css file into my child theme style....
1
vote
1answer
127 views

Performance : Duplicating `add_action`

If was wondering about PHP performance on Wordpress, If I had many duplicate add_action. add_action( 'init', 'func_a' ); add_action( 'init', 'func_b' ); add_action( 'init', 'func_c' ); //... so on ...
1
vote
1answer
555 views

Improving WP_Query for performance when random posts are ordered

I have made a new query after I've asked a question about my query_posts code... you guys didn't find that great, so I decided to change that. I made this: $page = (get_query_var('paged')) ? ...
1
vote
1answer
86 views

Is post_class(); going to slow Wordpress page speed

I just have a general question about the post_class(); function. As it gets category and tag classes relating to a post, is it database/server intensive to call this on a category page, or even a ...
1
vote
1answer
82 views

Relative links for performance?

I have a blog out there, for the sake of this answer you may take a look at it: http://blog.alphasmanifesto.com/. I'm currently working my way through some performance optimizations. As you may see, ...
1
vote
1answer
132 views

Do I need to flush rewrite rules when creating new user if using custom author rewrite rules?

I am using custom urls for my author pages like this: http://site.com/author_name After I create a new user, that author page appears as not found; however, if I update my permalink structure from ...
1
vote
2answers
456 views

Downsize CPU & DB usage in wordpress

i have created a smart interface WP based which we use to manage clients.. it uses a lot of information and data each time a client is returned / viewed. it is a locked interface and does not have ...
1
vote
2answers
500 views

Using Multiple Queries of “home_url” vs. Calling a Variable Multiple Times

Question Since I am using multiple instances of home_url() in one page template, I was curious if the following method would speed up my page load time. My method is to store the output of home_url() ...
1
vote
1answer
1k views

prettyPhoto media loading very slowly in Chrome

I'm having a problem with prettyPhoto media WordPress plugin (lightbox type) script in Chrome. It works beautifully in other browsers, but it takes forever to load in Chrome. When using this script ...
1
vote
1answer
340 views

Is it bad to store many files in a single folder?

I upload thousands of images and it stored in a single folder. Is it bad if too many images are in a single folder? would that slow down the loading of the image even though you're viewing an ...
1
vote
1answer
880 views

Load WP content with ajax less server demanding and faster than normal page loading?

This is a technical doubt I had after reading some articles about WP ajax process (cannot find them though). Is it faster and cheaper to load WP content (any content, page, post, widgets etc...) ...
1
vote
1answer
279 views

reducing the amount of wp_query calls

I'm working on a site where we're introducing drop down panels from the menu which will display thumbnails from various tags on the site. Each panel has a left column displaying a featured post, and ...
1
vote
2answers
102 views

cross-host benchmarking with wordpress

I am doing some cross-host benchmarking with wordpress, and rather than going to the huge trouble of setting up an identical install of wordpress on each host, a huge investment of time, etc., I want ...
1
vote
4answers
3k views

Performance problem with first load

I'm just trying to create my blog in WordPress hosted on my GoDaddy account (Windows Deluxe plan). WordPress is installed as subsite. When I check my blog after several hours of inactivity I have to ...
1
vote
2answers
1k views

Wordpress 3+ slow load times on Ubuntu 10.10

Running a test WP 3.0+ on Ubuntu 10.10 (Server & Desktop) MySQL, PHP 5.3, Apache. Installs fine and works ok, I installed a CentOS VM and wordpress is loading way too faster and its very quick ...
1
vote
1answer
27 views

What is this code trying to do? It was the cause of my 20s TTFB

I was troubleshooting a 20-30s TTFB for a Wordpress Theme with the help of the fabulous Query Monitor. I was able to narrow down the cause to this code: #e0e950# error_reporting(0); @ini_set('...
1
vote
1answer
371 views

Slow Mysql Queries

I'm having issues with Wordpress being too slow. I discovered it's because of MySQL queries. They take sometimes 2 - 10s - way too long. I installed Query Monitor to see what's causing the problem: ...
1
vote
1answer
39 views

Wordpress Caching On Demand

I want to cache on demand some expensive calculations and store them in a plain file that I can fetch later on. Is there any built-in function in WordPress Core Utilities that may handle adding, ...
1
vote
3answers
1k views

Wordpress takes too much time (100 seconds) to load - Front end and back end

I am facing a strange issue of WordPress taking 100+ seconds to load in backend as well as front end. My website is nawkaar9.com hosted on Digital Ocean 512 MB Ubuntu VM. I read a tons of answers and ...
1
vote
1answer
1k views

How to combine javascript files without plugins?

I remember (it seems...) there was a way, maybe some config option, to combine/merge javascript files (for production sites). I mean just with vanilla wordpress code, not plugins. Am I wrong? If not, ...
1
vote
2answers
4k views

Prevent CSS/JS loading when plugin is not used

I have a Wordpress theme (the7) that includes the Visual Composer plugin. This is good for my clients editing stuff in the back end, but it also adds unnecessary CSS and JS to every page load on the ...
1
vote
2answers
3k views

Preloader for a Wordpress Site

If i want to add a pre-loader to a Wordpress site that is going to have a high image content, is it best to put the code in the head of the site? I have done a child theme on my localhost site, but ...
1
vote
2answers
155 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 ...
1
vote
1answer
229 views

Plugins rewrite rules the right way

I need to create rewrite rules for my plugin. This plugin will be running on a very large WordPress Network (+2000 sites) so performance is important. Most tutorials and the codex recommend to ...