Until the day of today, I’m still using Wordpress. Not because I’m such a big fan of it, but mainly because it does what I want it to do. With some little tweaks it can actually be really fast and reliable. Also clients know their way around in Wordpress so let’s just keep them happy too.
By default Wordpress is a hell, every page uses many many requests and when you actually have some visitors and a complicated website, its not that hard to set your server on fire. In that case you have the option to go for expensive hosting, or you can tweak wordpress as much as you can to make it actually fast.
Note: I’m using wordpress only as a backend and all website I make are just using the Wordpress Api which I made, with some custom paths a lot cleaner and easier.
Here some plugins I’m using to accomplish this:
WP REST API Cache
The plugin I’m using to just cache all the routes. So sometimes routes can actually have some heavy information in it. Like the pages on this website for packages, they also call for a readme on github. This request can take a while, and to do this every time over and over it will kill the Github Api and the cheap ass server this Wordpress is hosted on.
Just install the plugin and it works out of the box! Every page requests now from the frontend is just being checked if its cached, and if so, it will just throw back the json for this request. Otherwise it will be made and cached for the next request.
The frontend of this website is hosted and deployed by Netlify. An awesome service and I would advice anybody who likes to create simple things, but also even heavier products to check it out.
But the frontend is being generated when you do a push from Github. All pages will be generated based on the content coming from Wordpress. So when the website is the deployed, but changes in Wordpress are made later, these won’t be visible yet on the front [they actually will be, but theres some trickery there,I will make a post about that]. In order to simply make a new deployment when you make a new post, page or anything. I use this plugin to trigger a deploy.
I’m not a fancy boy… I don’t pay that much for hosting and that comes with a price. If the wordpress gets messed up, or the server crashes, I will loose all my data. Thats why I use this little plugin which just sends me my database and details every week. So yeah… when it does, it will be back up fast enough.
All pages and blocks are build up with custom fields. Custom fields are awesome!
Custom Post Types
Well… you have plugins for that, but doing it in code is just as easy.
Worrying about uploading big images which make your website slow? Well I don’t… With the TinyPNG plugin you can just throw all your images in and it will take care of them. Making sure your images are compressed and way smaller.