Serverless Probably One of the Most Tricky Usage of Cloud Computing. Serverless is the native architecture of the cloud that enables to shift the operational responsibilities to the cloud host without thinking about servers. Previously we discussed about Serverless, gave example how to work with IBM Serverless and published example of PHP scripts with Serverless. Also one can install Apache OpenWhisk on own server. So, Serverless is not a new matter on this website. There are Already Community Developed Serverless WordPress and Few Serverless Plugins Which Many WordPress Users May Not Be Aware of.
Serverless makes WordPress static making it extra safe. There can not be much security guidelines to follow as the PHP functions simply will not work beyond call outside localhost. Static should be cheaper to host for high traffic.
getshifter.io provides full platform for Serverless WordPress hosting. But the pricing at present not closest to cheap when compared with normal WordPress hosting.
There is ServerlessWP on GitHub :
Which is designed to run on Amazon Serverless. As for Amazon, Serverless is a
Node.js CLI tool which is the first thing is to install using Node.js on your machine. Next, install the Serverless Framework via npm which was already installed when you installed Node.js :
npm install -g serverless
Some of the problems of Serverless are comments do not work, usual contact forms do not work, WooCommerce does not work. Any kind of membership modules do not work and WordPress site search does not work. So it is mostly suitable for dev setup.
Git clone or download the ServerlessWP repository. Place required binary files in the “bin” directory (“php-cgi” and “wget” are necessary binaries) which must be compiled to run. The “./bin/lib” directory requires a library noted in bin/lib/readme.txt. It will be put in place if “./build_bin.sh” is used. Put the WordPress installation directly in the “wp” directory so that the “index.php” is found in the root of “wp”. Modify “wp-config.php” for Serverless configuration. To handle file uploads in the WordPress backend, install the necessary WordPress plugins. Use the “./build_wp.sh” script for directions. Required WordPress plugins are ServerlessWP
Amazon Web Services, WP Offload S3 Lite. Place any other WordPress themes or plugins in the wp-content directories like any standard WordPress installation. Edit
serverless.yml file and look at the “custom” section at the top.
Now run “npm install” and “severless deploy”. It may take 60 minutes for AWS to create the necessary resources the first time. You will complete the WordPress installation by visiting the first URL in the “endpoints” output, this is the URL for the WordPress backend like
https://example.execute-api.us-east-1.amazonaws.com/dev/. Login to WordPress and enable the ServerlessWP, Amazon Web Services, and WP Offload S3 Lite plugins. That ends the installation.
There are WordPress plugins like :