Sybre Waaijer Profile picture
Feb 14 โ€ข 12 tweets โ€ข 4 min read
Someone recently asked how to #optimize a #WordPress website. Let's begin ๐Ÿงต:

1. Don't use anything created by Syed Balkhi;
2. If you sell stuff via WooCommerce, best to create a separate WordPress installation (until they hire me to fix their shit);

More ๐Ÿ‘‡
3. Don't optimize scripts. In fact, turn off concatenation:

define( 'CONCATENATE_SCRIPTS', false );

4. Turn on OpCache in PHP. Tweak it via user.ini if you're on a shitty host (the next tweet shows contents).

More ๐Ÿ‘‡
opcache.enable = 1
opcache.fast_shutdown = 1
opcache.interned_strings_buffer = 16
opcache.max_accelerated_files = 7963
opcache.memory_consumption = 192
opcache.revalidate_freq = 5
opcache.validate_root = 1
opcache.huge_code_pages = 1
opcache.jit_buffer_size = 256M

๐Ÿ‘‡
5. Don't use Block themes with Full Site Editing. They'll cut the load time in half.
6. Also don't use page builders like Elementor.
7. Turn off WP Cron, and ping the script via the webhost instead (the next tweet shows how)

๐Ÿ‘‡
Add this to wp-config.php:
define( 'DISABLE_WP_CRON', true );

Configure this at the host (ask them), every 3 minutes or more frequent if you run a shop; set example.com to your domain, obviously:

wget -q -O - example.com/wp-cron.php?doโ€ฆ >/dev/null 2>&1

๐Ÿ‘‡
8. Upload a favicon.ico to the root folder of your domain. It may even be an empty file; it just has to exist. Browsers naturally try this location and might spawn a PHP process when there's no file.
9. Don't use object caching unless your database is on another server.

๐Ÿ‘‡
10. Don't use page caching unless no user can affect your content. WordPress is dynamic.
11. Tweak MyISAM or InnoDB to fill ~50% of your available RAM. Enable auto optimization if available. This is the proper method for object caching.

๐Ÿ‘‡
12. Use a CDN. Never use Amazon S3 or another Push CDN; always use a Pull CDN. Use KeyCDN's plugin to connect.
13. Drop the NGINX proxy on your site and use Apache or Litespeed instead. If you have a CDN, you're not serving static files, and Apache is faster for PHP.

๐Ÿ‘‡
14. Don't use Cloudflare's free tire. Their DNS service is great, but their (free) CDN/proxy clears caches too often, so it almost always adds a delay. Besides, see 10.
15. Always set up a blog page if you have a static front page. Redirect it to home if you don't use it.

โœ…
Bonus:

16. Don't use Site Kit; it's terribly coded.
17. Don't use Jetpack or Akismet, same story.
18. Use The SEO Framework instead of other SEO plugins.

If your site became slower after this, you probably have plugins and themes enabled that handle scripts badly. One example is Contact Form 7; use HTML Forms or Gravity Forms instead.

Also, disable security plugins and rely on mod_security with Comodo or OWASP. Due diligence.
If your site is static (users cannot provide content and it's not a shop), use WP Super Cache and set just one single setting:
Settings > WP Super cache > Easy > Caching > hit Caching On (Recommended). Hit "Update status"; don't touch the plugin again.

Ignore the Jetpack spam.

โ€ข โ€ข โ€ข

Missing some Tweet in this thread? You can try to force a refresh
ใ€€

Keep Current with Sybre Waaijer

Sybre Waaijer Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(