Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress

Boris Kamp
Boris Kamp
16,660 Points

My Wordpress websites are painfully slow

Hi guys,

Im kinda lost here, I've successfully built a few custom themes for websites, here are some:

http://www.boriskamp.nl/

http://newparc.nl/

http://www.mijnawf.nl/

http://www.kampbeheer.nl/

http://www.emaxus.nl/

http://www.remonsbarbershop.nl/

I've tried to optimize them as much a possible by reducing images, compressing my JS and CSS files, using CDN for loading bootstrap and other external libraries .

But all these sites are still very slow loading, can anybody help me with this, what are points to start looking? I have no experience with this at all.....

3 Answers

Haneen Krimly
PLUS
Haneen Krimly
Courses Plus Student 29,322 Points

I've tried to check out a few of the websites you listed. And it seems there are way too many http requests on most of them. There is a great free tool by Google called Page Speed Insights which you can run and check how to fix a few of the issues.

Here's a link to the insights of one of the sites: https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fwww.mijnawf.nl%2F

What's basically wrong is that there are way too many CSS and JS files. They are called render-blocking because they must be fully loaded before the rest of the content! What you can do is MINIFY and COMBINE the files into one or two .css files and one or two .js files.

Another thing is image optimization, you can use a WordPress plugin called WP Smush.it which optimizes images whenever they are uploaded.

And one last thing that I think is important; enabling GZIP compression, you can do so by editing the website's .htaccess file to enable GZIP compression for all your files. You can just google GZIP compression Wordpress or something, that's what I did a while back.

Hope that helps!

Boris Kamp
Boris Kamp
16,660 Points

Hi!

Thanks for checking in! Two weeks ago I used Google's pagespeed test and went from ~30% to 60%-80% with my websites, I did the css/js minifying and combining, optimize images and installed WP Smush.it, enabled GZIP compression and browser cashing etc etc.

I have one JS and one CSS file to style my theme, the rest comes from plugins I use and I have no control over them I think?

Im lost on what to do next.

Haneen Krimly
PLUS
Haneen Krimly
Courses Plus Student 29,322 Points

You actually sort of have control over them, you can check out functions.php file, that's where all the enqueuing scripts happens.

I actually think that the CDN you're using is doing more harm than good? Some of the .css files are named "CDN something!" Instead, just serve the css stuff in one or two minified files. Maybe there's no need for a CDN here?

And it seems as though some of the images did not compress properly, you can try and compress them all again using the same plugin (Bulk Smush all my images).

I don't really know what else you can check. I usually just try to use as less js and css as I could, for example I stopped using icon fonts and switched to SVG sprites because it's super faster and better overall.

Hope that helps!

Heather Newton
Heather Newton
13,598 Points

I would highly recommend looking into hosting on WP Engine. I have a friend who uses them to host all of his client's websites. He made a great compare chart listing all the reasons why he requires his customers to pay extra for WP Engine hosting (as opposed to Go Daddy, Host Gator, etc). You can look over the chart here: http://www.copperleafcreative.com/services/wordpress-professionally-managed/