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

The tag has no usage guidance.

80
votes
14answers
6k views

Steps to Optimize WordPress in Regard to Server Load?

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.
62
votes
8answers
5k views

Refactoring Wordpress to improve memory performance [closed]

I had a close look at Wordpress memory consumption. On my site, it seems that for each page hit 20MB of RAM gets allocated, just to prepare comfy environment for all the plugins to run in. I plotted ...
19
votes
3answers
13k views

How to Optimize WP site for millions of posts

I'm working on a website for a company that will very likely be creating millions of posts via a custom post type. They're prayers, so basically the user on the front end just submits a short phrase ...
19
votes
1answer
2k views

Optimize post insert and delete for bulk operations?

Not much noticeable when working with individual posts, but when you create or delete multiple thousands in bulk and by code - process is quite slow. Are there any good tweaks to apply and corners to ...
14
votes
4answers
6k views

How to cache json with wp-super cache

In a new project we are using wp-super-cache (the client's preferred plugin) to create the static html files for custom content types. But we are trying to figure out if everything is being cached ...
14
votes
6answers
6k views

How to benchmark a WordPress installation? [closed]

I'm trying to gather some benchmarking data to determine how well my optimizations to WordPress are fairing. I've found this page on High Traffic Tips but it doesn't contain any data. Are there any ...
14
votes
2answers
998 views

What is a good alternative to using $content_width for image optimization?

The $content_width GLOBAL in WordPress effects many themes and even some plugins by limiting the size of images and embeds in posts, it is a requirement for themes submitted to wordpress.org. It is ...
11
votes
4answers
5k views

Optimizing a Proximity-based Store Location Search on a Shared Web Host?

I've got a project where I need to build a store locator for a client. I'm using a custom post type "restaurant-location" and I have written the code to geocode the addresses stored in postmeta ...
10
votes
2answers
2k views

WP_Query leaking absurd amounts of memory

Every time I call WP_Query() in the function below, Wordpress leaks 8 megs of memory. And since I call this function a lot, things get hairy pretty quickly... :( I've tried unsetting the resulting $...
10
votes
2answers
10k views

Wordpress Database Slow - should I switch to InnoDB?

I have a WordPress site with well over 10k posts, and things are starting to get very slow whenever I am adding and editing posts. Pages load nice and fast for users, along with the admin lists of ...
9
votes
3answers
1k views

What's a good strategy for planning WordPress DB growth?

Hoping for some feedback on the topic of optimizing and staying on top of performance as a WordPress database grows... to paint a picture.... let's say you have a WordPress / Buddypress MU site that ...
8
votes
2answers
5k views

How to prevent execution of default query, while preserving ability to use WP_Query in template?

PROBLEM: I'am trying to prevent execution of default WordPress query for custom category template. I have found a possible solution, but looks like it preventing execution of all post queries: ...
8
votes
4answers
506 views

Set Alias for meta_query arguments in get_posts()

Is there a way to set an alias on the meta_query arguments when running a get_posts()? One of my queries is performing poorly. To optimize I just need to be able to reuse the same joined table ...
8
votes
2answers
565 views

Make Google index the entire post if it is separated into several pages

While this is a question, it is as well a serious warning to publishers that separate their posts using <!--nextpage-->. Bare with me. I run a highly trafficked multiple author platform that ...
8
votes
1answer
218 views

How do I optimize a custom post type admin page with 25,000 posts?

I'm getting the occasional excessive resource limit error to due to loading so many posts at once. We had set the PHP limit to 128 but just loading the list of posts for a couple of the post types is ...
6
votes
6answers
7k views

Long Waiting Times on GoDaddy?

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+ ...
6
votes
5answers
2k 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 ...
6
votes
2answers
3k views

Safe to disable wptexturize?

To optimise the speed of my platform (beyond caching, database optimisation, JPEG compression, CSS sprites etc), it has come to my attention that disabling the wptexturize() function may give some ...
6
votes
1answer
2k views

Separate Database Tables For Different Post Types

one big problem with wordpress is that everything on it is a post(a record in wp-posts table)! images, posts, pages, products(for example in woocommerce), portfolios, Post Revisions... Almost ...
5
votes
2answers
2k views

Scaling a WP eCommerce site

Related to this question. Any recommendation on tools, plugins for optimizing a large eCommerce site on WP. Currently hitting 1000 items and 5000 more items coming. It seems the optimizations would ...
5
votes
3answers
376 views

register_post_status - show_in_admin_all_list & show_in_admin_status_list does not affect query

In the register_post_status, I've already disabled show_in_admin_all_list & show_in_admin_status_list for my custom status my_hidden_status However, from the query log the post_status ...
5
votes
1answer
361 views

Running WordPress on low-end hardware/resources?

I knew about Atom-based dedicated servers, but these plug-class servers take it to whole new level of low-end extreme. Most of WordPress optimization talk is about surviving on shared hosting or ...
5
votes
2answers
51 views

What's the case against transient-ing almost everything that's mostly static?

Assume I have a menu that's simply static, for most sites, or rather, let's use my example, a blogging site, it almost never, never changes. Why not hook it to a transient that never expires unless ...
4
votes
3answers
4k views

Optimize Multiple Taxonomy Term MySQL Query?

(Moderator's note: Title was originally: "query/database optimisation") I'm written a function for a custom "filter" search panel that allows users to select terms from up to four custom taxonomies. ...
4
votes
11answers
2k views

Website is slow: advice on optimization

This WordPress-based website i just released is dead slow. I've optimised my theme a lot and get a pagespeed of 91/100 but the first time to byte is the culprit: it takes 8 up to 20 seconds. I've ...
4
votes
3answers
10k views

Where should I host my images?

I just read this article http://codex.wordpress.org/WordPress_Optimization/Offloading on how you can upload your content to external sources to improve speed and save bandwidth. Anyway, my site has ...
3
votes
2answers
396 views

Easy way to process search results before displaying

I've got several search forms on my site and I want them to show different results. My website has a very strict hierarchy and the search form on a parent site should only show results from it's child ...
3
votes
1answer
214 views

Speeding Up Bulk Post Creation - wp_insert_post & update_post_meta

I am creating posts (variable products) using (wp_insert_post) function. An Example, I have 9 colors, 9 sizes. Which makes 9×9 = 81 total variations for 1 product, which is 81 times below function to ...
2
votes
3answers
129 views

Defer Code in Widgets - Page Speed

How to UP Page Speed With Widget Defer? Is there a way to defer a widget in the footer? I have an external API in a footer widget which is slowing down my page. It is not needed until the page is ...
2
votes
6answers
7k views

Speed up Wordpress

I don't have the feeling that my blog is particularly slow, but that's because I haven't really started out yet. I'm very worried that it will get slow soon, especially because I will have blog posts ...
2
votes
3answers
2k views

Settings to get the most out of W3 Total Cache

I'm running a dedicated server which hosts one website - our WordPress install. Currently we're getting around 400,000 pageviews per month and that will likely rise quickly over the coming month - ...
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
2answers
5k views

Preventing YouTube embeds loading multiple instances of player JS?

I have noticed on many WordPress sites I work on that when there is more than one YouTube video embedded, multiple instances of the player JS will be called. Since it's a full megabyte of data, I am ...
2
votes
2answers
3k views

If I consider changing my WordPress DB tables to InnoDB, will it have an effect on the way WordPress works?

I found a superb post here about optimising WordPress for large installs. One of the steps refers to lighthttpd which sounds excellent but isn't currently supported by DirectAdmin. Last time I messed ...
2
votes
2answers
594 views

Splitting the main query in multiple loops with query_posts and/or pre_get_posts?

I have a custom post type 'events', to which I have associated a custom taxonomy 'calendar'. The calendar has 12 fixed terms, for each month of the year ( 'august', 'october', 'november, etc.). I'm ...
2
votes
1answer
514 views

Disable unneeded scripts in a wordpress installation

I have inherited a quite bloated wordpress website that runs really slow even on dedicated hosting. I am trying to optimize the speed of it. I have run the website through different websites that ...
2
votes
1answer
82 views

Image sizes and order of operations

I'm working on optimizing my site, and part of that is compressing images and using smaller versions. I'm using WP Smush and creating a bunch of sizes for each image. All images have been smushed. My ...
2
votes
1answer
126 views

Performance-wise, is it better to enqueue a (small) script on every page or test to see if it's needed?

I'm using the FitVids.js script to make YouTube video embeds work with a responsive layout. The script is < 3kb, but only about half of my pages actually have YouTube embeds. In terms of total ...
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
148 views

Is checking whether the blog is installed necessary?

My Wordpress site has become kinda slow and unresponsive, so I am trying what can I do to speed it up by eliminating unnecessary database queries and other things. I stumbled across suggestion found ...
2
votes
1answer
3k views

How to remove in the wordpress database all posts revisions except the last three?

here is the commonly recommended sql command for removing posts revisions and cleaning up the wp database: DELETE a,b,c FROM `wp_posts` a LEFT JOIN `wp_term_relationships` b ON (a.ID = b.object_id) ...
2
votes
2answers
593 views

Publish a message on facebook after having posted a comment

I would like some advice on how to improve the code I use for allowing people to comment posts. Users can only submit a comment if they are connected with Facebook. I started developping this feature ...
2
votes
2answers
5k views

How do I edit the htaccess file to optimize my website?

Hi I have tried to optimize my website energyshop.se for a cpl of days but I cant seem to get it done. This is how my .htaccess looks like: Header unset ETag FileETag None # Hantera och redirecta ...
2
votes
1answer
771 views

Can't move jQuery to footer

Below two methods did not help me. My jQuery is always on the head section. What can be the reason? Method 1: (adding below code to function.php) if (!is_admin()) add_action("wp_enqueue_scripts", "...
1
vote
1answer
2k views

Should I remove transients from the wp_options table?

I have been doing some cleaning up in the database of one of my WordPress installs, and I noticed that the wp_options table was about 2.1mb, and had 1200 rows. I've gotten it down to around 800 rows, ...
1
vote
1answer
69 views

Optimizing WordPress's styles and scripts

I'm trying to optimize my website, get rid off unwanted scripts and styles. I wanted to ask what is the best way to do so. What is the difference between wp_deregister_script and wp_dequeue_script ? ...
1
vote
1answer
973 views

What's faster? One big query, or several smaller ones?

I'm working on an app that will require a query, via Ajax, for a bunch of posts in random order. Something like this: $query = new WP_Query( array( 'posts_per_page' => 50, 'orderby' => 'rand' );...
1
vote
1answer
160 views

How to optimize my query filtering out unwanted data?

I use get_posts ($arg); to query the post table. Usually I need only three fields: post_title, ID and post_excerpt. But the data returned are many more, including post_content that is usually huge. I ...
1
vote
1answer
4k views

Prioritize visible content - Page speed issue on Google insights

I'm new to wordpress and i tried to speed up the site, but i got some error please see the image. I used w3 total cache,autoptimize and Above The Fold Optimization plugins. But still site is slow on ...
1
vote
2answers
502 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() ...