you are viewing a single comment's thread
view the rest of the comments
[–] 10 points 9 months ago* (5 children)

Use a page caching plugin that writes HTML files to disk. I don't do a lot with WordPress any more, but my preferred one was WP Super Cache. Then, you need to configure Nginx to serve pages directly from disk if they exist. By doing this, page loads don't need to hit PHP and you effectively get the same performance as if it were a static site.

See how you go with just that, with no other changes. You shouldn't need FastCGI caching. If you can get most page loads hitting static HTML files, you likely won't need any other optimizations.

One issue you'll hit is if there's any highly dynamic content on the page, that's generated on the server. You'll need to use JavaScript to load any dynamic bits. Normal article editing is fine, as WordPress will automatically clear related caches on publish.

For the server, make sure it's located near the region where the majority of your users are located. For 200k monthly hits, I doubt you'd need a machine as powerful as the Hetzner one you mentioned. What are you using currently?

  • source
  • hideshow 5 child comments
  • [–] 6 points 9 months ago* (3 children)

    This is good advise, listen to dan. WP Super Cache is amazing although getting it working just right can take some tweaking.

    The Redis Object Cache plugin is worth a try. It'll only take a minute to set up.

    Is it 200k users or 200k page loads? Those are really different as each user will load multiple pages in a month. If it's 200k page loads then that server is way way too powerful (and expensive). Don't let a crappy developer hide their lack of optimization skills by throwing your money at the problem.

  • source
  • parent
  • hideshow 3 child comments
  • [+] [S] 2 points 9 months ago (3 children)
  • [–] 3 points 9 months ago* (2 children)

    Oh right, yeah, Wordpress does tend to use up an awful lot of storage - every image gets copied 5 or 6 times, in different sizes just incase you need that size. It's nuts.

    You don't need to store those images in your server though, they can be uploaded to S3 (object storage) where it is 10x cheaper to store them and then you can have a cheaper VPS. This way the VPS only needs to have enough storage for your MySQL database.

    https://wordpress.org/plugins/amazon-s3-and-cloudfront/

    There are many providers of S3-compatible storage, you don't need to use AWS. Cloudflare R2 is super cheap - https://www.cloudflare.com/en-gb/developer-platform/products/r2/ or Hetzner - https://www.hetzner.com/storage/object-storage/

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 9 months ago

    they can be uploaded to S3 (object storage) where it is 10x cheaper to store them

    This is heavily dependent on the VPS. Some of my VPSes are cheaper than object storage would be.

  • source
  • parent
  • load more comments (-1 replies)
  • load more comments (-1 replies)
  • [+] [S] 2 points 9 months ago* (1 child)
  • [–] 1 point 9 months ago

    Since you're using Hetzner, one option is to get a Hetzner storage box to store the media. 1TB space is $4/month (not sure about EU pricing). You can mount the storage on another system via NFS.

    On-disk cache prevents a "thundering herd" problem when you reboot - an in-memory cache would be empty on rebootz whereas an on-disk cache survives a reboot. Linux handles caching files in RAM automatically.

  • source
  • parent
  • load more comments (-1 replies)