Ran your WordPress website through a performance test like PageSpeed Insight or WebTest?
Ugh. Been there, buddy.
Performance testing is important for good UX and better search rankings. Even if you fared worse than you expected, at least now you know and you can do something about improving your performance and speed.
Here’s how you optimize your WordPress site for performance.
Note: It’s not rocket science.
Even though every hosting provider likes to market themselves as such, they can’t all give you unlimited data transfers and 100% uptime.
On Shared hosts: Check with your hosting provider (and the reviews of people who have used their service) to see if there’s any truth to the claims of storage, number of visitors, bandwidth, data transfers, etc.
On Managed hosts: You’re almost completely safe in terms of site speed and performance. Managed hosting providers keep your back-end in their control, which may be more restrictive (for customization purposes), but ultimately helps keep it fast and safe.
VP servers and enterprise grade solutions are usually dedicated or shared between a small number of clients.
Solutions like WP-Engine and WordPress.com are managed hosting providers, while SiteGround and Bluehost are shared hosts.
Caching plugins like WP super cache and WP total cache can work wonders to speed up your side by creating static HTML pages to load from when a user revisits.Most WordPress caching plugins also take care of minifying HTML, CSS, and JS scripts, minimizing HTTP requests, and GZIP compression.
You can also use database caching tools like Memcached or Redis (MySQL server side scripts).
Some caching plugins will take care of employing lazy load filter for images (only loading images when the portion of the page comes to screen), but if they don’t, install Lazy Load XT plugin for media content like images, videos, and iFrames.
Compress images (remember: resizing only fits the image to set width/height and does nothing for its size) using plugins like EWWW Image Optimizer or WP Smush.it.
Reduce number of HTTP requests if you have a group of images that can be ‘pasted’ together to form one single PNG image. Use CSS spriting trick (through tools like Sprite pad) to create the image and corresponding CSS code.
Here’s the easiest depiction of a CDN’s working:
Basically, your original server can relax while the edge servers (aka Points-of-Presence or data centers) of a CDN network deliver their own cache of original server’s dynamic content to users across the globe.
Users get data from a CDN PoP closest to them instead of the original server which could be halfway across the globe. This will speed up your website like nothing else can.
You can sign up for services like MaxCDN, CloudFlare, BootstrapCDN, etc. to let their server networks deliver your content to your global user-base. Keep in mind that this method is best suited for medium-to-high traffic sites. If you get 30 visitors a month, you can forego it.
Themes that pack high-end functionality in the form of bundled plugins, and visual customizers are also usually the ones that are slow to load.
Clean, well coded themes are developed with elegance and performance in mind. Make sure your theme isn’t loaded with bad, bloated code and PHP errors. Always buy themes and plugins from a trusted source.
If you are developing your own theme, work with WordPress coding standards and W3C validation in mind for best performance and minimal future hassles.
You can also whet your performance by analyzing your plugin counts and diagnosing them all for load time. Plugins like P3 (Plugin Performance Profiler) generates test traffic and tests all your plugins for individual load times.
Keep in mind that “less is more” when it comes to installing and using themes and plugins on WordPress. Instead of building a whole inventory of useless junk (you know, “to keep your options open”), only install and use themes and plugins that are relevant and have multiple features (so you don’t have to take care of those by downloading additional plugins). Anything you install on your WordPress website should be clean, lightweight, and optimized for performance.
When not in use or broken, uninstall a plugin/theme (simply deactivating/switching doesn’t work as well).
This not only improves performance but is also good for security.
WordPress is a database driven content management system, and overtime that database can get loaded with useless crap. This can affect your performance.
What you need to do is clean up that database of old unwanted junk.
Install a plugin like WP-Sweep or WP-DB manager and use it to clean your database of old and redundant revisions, spam and unapproved comments, and duplicated or orphaned metadata from your database.
1. Check Hosting for bandwidth and storage limitations
2. Use Caching solutions and plugins
3. Optimize your front-end and media content with lazy load filters, compression, and using CSS sprites
4. Medium-to-high traffic websites can employ a CDN to improve performance for users across the globe
5. Check themes and plugins to make sure they’re cleanly coded and standard compliant. Only install what you need and use. Analyze plugins for their load times.
6. Cleanup old, useless data and optimize your database for better speed
It’s really not that difficult to optimize your website for speed. If you have more methods, share them with us in the comments section.
Author Bio: Tracey Jones is a professional WordPress developer for a leading custom WordPress development company – HireWPGeeks Ltd. She is a passionate blogger who loves to write blogs and articles about WordPress development and web design technologies in her free time.