Amazon Lightsail – virtual private servers made easy

Amazon announced a new service – Amazon Lightsail – virtual private servers made easy, starting at $5 per month.

pricing

This is basically a much simplified setup of a few of their services, such as Amazon EC2, Amazon EIP, Amazon AIM, Amazon EBS, Amazon Route 53, and a few others.  For those, who don’t want to figure out all the intricacies of the infrastructure setup, just pick a VPC, click a few buttons and be ready to go, whether you want a plain operating system, or an application (like WordPress) already installed.

It’s an interesting move into the lower level web and VPS hosting.  I don’t think all the hosting companies will survive this, but for those that will do, the changes are coming, I think.

WP-CLI v1.0.0 Released!

WP-CLI project – a command line interface to WordPressannounces the release of v1.0.0.  After 5 years of development, the tool is rock solid and stable (that is being affected to a degree by the frequent releases of the WordPress itself).

There are some new features and a tonne of improvements in this release, including, as the major version bump indicates, some backward compatibility breaking changes.

If you are involved with WordPress projects, this tool is an absolute must have!  Whether you are automating your deployments, doing some testing, or setting up and configuring WordPress instances on a variety of servers.  It will save you time and make you life much much easier.  Check it out!

(At work, we are using it as part of our project-template-wordpress setup,  which is our go-to repository for initializing the new WordPress-based projects.)

 

Magento database maintenance

If you are running a Magento-based website, make sure you add the database maintenance script to the cron.  For example, append this to the /etc/crontab:

# Magento log maintenance, as per
# https://docs.nexcess.net/article/how-to-perform-magento-database-maintenance.html
0 23 * * 0 root (cd /var/www/html/mysite.com && php -f shell/log.php clean)

Thanks to this page, obviously.  You’ll be surprised how much leaner your database will be, especially if you get any kind of traffic to the site.  Your database backups will also appreciate the trim.

 

S3 static site with SSL

s3-static-site

S3 static site with SSL and automatic deploys using Travis” is a goldmine of all those simple technologies tied into a single knot for an impressive result.  It has a bit of everything:

  • Jekyll – simple, blog-aware, static sites engine, for managing content.
  • GitHub – for version control of the site’s content and for triggering the deployment chain.
  • Travis CI – for testing changes, building and deploying a new version.
  • Amazon S3 – simple, cheap, web-enabled storage of static content.
  • Amazon CloudFront – simple, cheap, geographically-distributed content delivery network (CDN).
  • Amazon Route 53 – simple and cheap DNS hosting and domain management.
  • Amazon IAM – identity and access management for the Amazon Web Services (AWS).
  • Let’s Encrypt – free SSL/TLS certificate provider.

When put altogether, these bits allow one to have a fast (static content combined with HTTP 2 and top-level networking) and cheap (Jekyll, GitHub, Travis and Let’s Encrypt are free, with the rest of the services costing a few cents here and there) static website, with SSL and HTTP 2.

This is a classic example of how accessible and available is modern technology, if (and only if) you know what you are doing.

runkit – changing the PHP internals on the fly

Here is something I didn’t know about until today – PHP’s runkit extension:

The runkit extension provides means to modify constants, user-defined functions, and user-defined classes. It also provides for custom superglobal variables and embeddable sub-interpreters via sandboxing.

This blog post – “Shimming PHP for Fun and Profit” – demonstrates how to use it with a case for a custom base64_decode() and unserialize() functions.  Here is the actual code on GitHub, which shows off how to use runkit_function_rename() and runkit_function_add().

This is not something one would use frequently, but might be an absolute life saver on a rainy day.