I read the article at joaoperibeiro.com on Optimizing WordPress in 8 steps and found it very helpful. (Thank you for pointing me to Fast Velocity Minify) I also wanted to throw in a couple of items, and hopefully not cover what he covered so well.
Many times I have limited availability to server configuration, or the site is on a shared server. (I hear you shudder.) These are mostly sites that come across my desk to increase the speed. It is a good day if I have sftp access. A worse if it’s on a godaddy shared server.
But enough of that…on with the list:
- Another tool I use is a short script I wrote that uses phantomJS to grab a snapshot of the website. I do this for desktop, tablet, and phone renders. The reason is that once I’m in the actual files, moving js and css around, the site can start to get jacked up, and since I did not build the site it is good to have a reference for how it is supposed to look. If you are comfortable with command line scripts and have installed phantomJS, you may find my script here.
- Review plugins. What’s in there, what’s turned on, and what needs to be updated, and what I can turn off. You may be surprised what people think is important for their site to work properly in a production environment (Hello Dolly, I’m looking at you!)
- Add some plugins:
- WP Database Backup (Backup that database before making some changes!)
- I have been using WP Rocket cache with some good success, but please, use what you like. I’m not an expert enough to say what is better than another.
- P3 Profiler to review site
- WP Optimize to work on that database
- ShortPixel to optimize images
- There are others, depending on the site, but these are my go-to
- Once I know all the images have been optimized I begin the js/css aggregation and deferring. This is where things can get a bit wiggy, and where having that image from step 2 can come in handy. Things will break here.
- When I’m at the limit of what the software can do, sometimes it is just going into the the theme’s header.php and footer.php files and physically removing/moving items. I have found some fairly egregious issues hidden in the code, such as duplicated js libraries. Again, I did not build these sites. No idea who did. I’m only here to make it a bit faster.
- You may get lucky and move that 45/52 to a 78/91…or you may fight for hours to gain 3 points. Start big, go for the easy hits first, as those will be the greatest gains, and maintain a realistic expectation. And if this is on a production site, check that site often!
As much as I groan when a Wordpress site comes across my desk, I do have to admit the joy in getting a slow site to load fast. Who knows…I may turn out to be a WordPress developer one day.