There are tons and tons of ways to make your site load faster. From optimizing cache size, reducing page weight, and making sure your browser is up to date. The list goes on and on. But don’t let the length of this article intimidate you! We’re going to break it down into bite-sized pieces so you can put these tips into action at a pace that suits you best. And don’t forget to share this with other people who might benefit from these time saving techniques!
Follow a few of these simple tips, and you’ll never have to worry about people abandoning your site due to slow load times again!
1. Cut the fat: remove unnecessary CSS rules
Your website may contain thousands of lines of code used for styling, layout, and positioning elements on every page. If you need only a few CSS rules, no problem. But if you’re loading more than a small handful of CSS rules for each page load, then chances are your website’s pages can be streamlined!
The first place to look is the “unused” or “orphaned” CSS rules in your stylesheet(s). Those won’t get used because you never applied those styles to any elements. Don’t worry about deleting them from the parent stylesheet, though—you can just import them directly into the pages where they’re needed.
Some plugins also add extra CSS rules that you’ll need remove before optimizing your site’s load time. You can easily locate these by using the Firebug plugin for Firefox. It has a feature called “Show Parent Selector” that makes it easy to see the CSS rules of the selector above, below, and on both sides. If you ever need to edit your stylesheet from your WordPress dashboard, then use Firebug for Chrome—it works similarly to its Firefox counterpart.
2. Organize your site’s CSS in an efficient way
You’ve probably heard the word “strict” used to describe a programming language. The same goes for CSS, too! Strictly speaking, it means there are certain aspects of your code—such as default background colors, margins and padding, etc.—that will not be changed by any stylesheets you use. This is the best option for your stylesheet because it’s the fastest to load and will make the smallest footprint in your browser’s cache.
If you don’t know about “strict” (in context of CSS) I can tell you that if we change few pixels of our website, entire code of this website will be changed. I don’t want to say it but not always we need this huge code of CSS, because most of time our site will look in the same way.
The main goal is to minimize your website’s load time and reduce the amount of data that needs to travel back and forth between your server and visitor’s browser. It’s important to note that you only need one global selector (i.e., the biggest selectors or ID) for most sites, and it’s usually your <body> tag or a container div around the entire page content.
3. Optimize your cache size or use server-side caching
How big is your website’s cache? You should know because it affects load time! The smaller your cache size, the faster your site’s pages will be delivered to your visitors.
To check if you’re using server-side caching—and which type—check out Google’s PageSpeed: how big is your website’s cache? You should know because it affects load time! The smaller your cache size, the faster your site’s pages will be delivered to your visitors. To check if you’re using server-side caching—and which type—check out Google’s PageSpeed documentation . It offers a few useful stats about how it works on their end, too!
“So what should my cache size be?” For WordPress sites, I recommend using a setting of at least 128KB (or more!). Some themes and plugins are caching pages in the background too, so don’t ignore that possibility. To check your site’s cache size for certain types of requests, use Firefox’s PageSpeed add-on with the “SunSpider” tool.
Opponents of minification say it can lower the readability of your code. I’m going to have to agree if you’re replacing line breaks with single spaces (that’s a minor thing so don’t worry!), but using tools like YUI Compressor to remove excess whitespace will not affect its readability at all.
By the way, you can also minify your images to save bandwidth and load time. If your website uses already-compressed assets (such as PNGs), then make sure to select that option when you run YUI Compressor. For those with a lot of image files, I recommend SmushIt for WordPress because it’s easy to use for the average joe.
5. Reduce your server response time
By combining some of the other techniques in this article, you can start pinning down any code that might be making your site slow on its initial load—such as images or huge files that are loaded with every page request. But what happens if everything is fine? It’s time to eliminate the need for code altogether with a service called Google PageSpeed. This caching tool creates static HTML and CSS files on your server that are served up quickly by default—and there’s even more performance advantages you’ll notice when you install it.
How good or bad of an idea this is depends on what type of site you run. For example, it makes little sense to do this on a blog because the content changes so frequently. It also doesn’t make sense for a static site that’s already delivered as HTML and CSS files (such as your favorite CSS galleries). On the other hand, if your entire site is just plain old HTML (such as a news site), then this is an excellent way to make it load in the blink of an eye.
6. Optimize your images
Just like any image that you want to use for the web, logos and stock photos should be saved at a quality level of 70% or lower (in Photoshop, set Save for Web to “Good”). If you want, you can also reduce the image size (in Photoshop, shrink the canvas size) and save for web again. For instance, one of my portfolios saves at 1MB for a full-sized image when it could be reduced down to 150KB.
7. Optimize your code
Some of the most basic things you can do are not necessarily listed in your WordPress admin menu’s optimization tab. Check out some of these tips and make sure your code is as clean as it possibly can be:
Remove any commented-out lines from your theme’s functions.php file (for example, those that have a // in front of them).
If you’re not using something, remove it—for example, remove the “Facebook Like Box” code in your header.php if you don’t have a Facebook page for your site. (But make sure to fix any errors from this step first!)
Make sure that your WordPress admin menu has nothing but hover effects enabled and has a minimum amount of icons that are always shown (such as the Dashboard, Posts, and Media).
If you don’t need it on every single page, avoid adding the “pagination” code to your single.php pages. Instead, just remove those links on individual posts or pages if you’re worried about breaking anything.
8. Use a content delivery network (CDN)
I know what you’re thinking: “What does Google have to do with me loading my WordPress site faster?” You might be surprised! When you sign up for the free WordPress CDN service, Google servers will host your static code files so that it’s closer to your visitors. HTTP requests are usually cached by ISPs on a set expiration date. By setting up your code through Google in the first place, you’re forcing them to fetch it every single time (rather than serving up their own local copy). That’s why we recommend adding it as an extra layer of defense, rather than trusting it for your whole site.
9. Switch to a faster database engine
MySQL is the most common MySQL database for WordPress. But it’s easy to underestimate how much your site can grow, which might have you switching to another program like MongoDB at one point or another. Since each of these databases will store and retrieve data differently, the process of moving everything over is best done with a plugin or manually. If you’re using the awesome database administration tool Sequel Pro, it’s easy to download your data from MySQL and import it into whatever new program you decide to try out in the future—just be sure to run this backup first (and make sure that your host actually supports such an import).
10. Avoid using the “X-Pingback” header
While pinging services like Pingomatic and Ping-O-Matic can be useful for sites that have a ton of social media accounts, they also get in the way of other people who would be linking to your site. The X-Pingback HTTP header is used to communicate with ping services, but can also be set to nofollow for pages you don’t want them contacting—like for your login page.
11. Use a browser caching plugin
If you don’t want to deal with the hassle of optimizing your site for speed (or if you simply lack the time), there are plenty of great plugins that allow you to take advantage of other people’s hard work: Jetpack, W3 Total Cache (the most popular caching plugin), or WP Super Cache. The free version of W3 Total Cache can be a great way to bring your site from its default speed score—59/100, according to Pingdom—to the 70s or 80s without necessarily having to change anything about your website.
12. Keep up with Google and Bing’s latest search engine algorithms
Google and Bing are always making changes to their search engine algorithms, which often result in websites that were once at the top of the rankings getting dropped down. Since these changes are so heavily publicized by everyone from Moz to Search Engine Journal , it’s worth paying attention to avoid any sudden surprises!
13. Don’t overdo it with widgets, shortcodes, or plugins
This is another thing you can do without having to change anything about your theme—it’s all about prioritizing. Having plenty of widgets on one page can slow down your website big time (which is why I never use the default “Recent Posts” widget in WordPress). Adding too many plugins also means loading more than what’s needed and even slowing down your site .
14. Use a faster hosting provider (.com or .net?)
This isn’t something you can change, but it is the most important factor in your website loading speed! That’s why I recommend using SiteGround for all my clients—they’ve got great customer service, excellent uptime, and very fast servers (especially when using their “Flywheel” cache plugin).
15. Use a CDN for your media files
Instead of loading all the images and videos on your site from one server, use a content delivery network (CDN) to take some of the responsibility off your primary server. This can accelerate your website significantly—especially if you’re heavy on graphics or video (like we are here at Wunder). A CDN will also be much more reliable than your primary host if you’re experiencing outages. CloudFront is the most popular and easy to use CDN, but it’s not free—although you can get a decent deal by buying an annual subscription instead of paying for every month. If you don’t have that kind of cash laying around, CloudFlare is a good alternative—just go with the free plan and don’t enable any CloudFlare features (they impact your site’s performance significantly).
16. Don’t host photos or video locally
If you’re using a service like Wunder, where we handle all images for you, make sure to update your file URLs to point to your CDN instead of directly hosting the files. You can see how we do that here . Also make sure you’re using long assets slugs on images so they get cached under the file’s name—this will help with Google indexing and speed. If you have any videos, don’t host them locally either! We host all of our videos on Wistia, which is a super fast video hosting service. (We also send the “Watch” link to Googlebot so it can index the videos in advance instead of having to crawl them at an opportune time.)
17. Keep your website running smoothly with caching plugins
One way to minimize how often your server has to go and grab new files is through a caching plugin. Caching plugins work by saving the most frequently requested files on your web server so it’s not necessary for each visitor to download them every time (the process, which is called an HTTP request ). W3 Total Cache is extremely popular, but other options include WP Super Cache or the most recent addition to the caching plugin family, Cloudflare’s Rocket Loader .
18. Avoid using too many plugins
Even though caching plugins can be great for site optimization and performance, that doesn’t mean you should install every single one out there! It’s easy to overdo it—especially with all of the different “plugins for plugins” that can slow down your site. We’ve talked before about how to optimize the WordPress admin , so make sure you’re only using clean plugins that are necessary!
19. Optimize your .htaccess file
Instead of installing a plugin, you can change what’s called your .htaccess file to increase its effectiveness and optimize your site. Here’s a great tutorial on how to do that . .htaccess files live in your public_html folder, and it can be a bit tricky making changes here without having the right stuff for editing (like FTP access). If you’ve never touched this file before or aren’t comfortable with it, just leave this tip alone!
20. Keep your PHP running smoothly with a cache plugin
Alignment Online is a digital marketing agency with expertise in SEO, PPC and behavioral neuroscience. We use these three pillars to create your perfect plan that will not only increase traffic but also drive conversions! If you’re interested in our services, contact us today at email@example.com for more information about how we can help make your site load faster by taking care of all the heavy lifting when it comes to hosting photos or video locally, caching plugins and optimizing .htaccess file. Please visit alignmentonline.com if you want more suggestions on ways to improve loading speeds without having to do any manual work yourself!