Google Cloud CDN for GCP WordPress

The more (concurrent) traffic a website receives, the more important it is for its contents to be hosted on a content delivery network (CDN). By having your site resources spread out across many servers across many regions around the world, it will take much less time (in terms of “hops”, or jumps from server to server a request needs to make) to fetch the site’s contents.

One of Google Cloud’s less-known features is its Cloud CDN which leverages Google’s global network of data centers, servers, and ISP integration to deliver content to the end user in a quick manner. Its efficiency is further increased when coupled or used with other services in Google and Google Cloud, such as Google Domains, Google DNS, and Google Compute Instances. Since 2018, this site is hosted using Google’s Click-to-Deploy WordPress deployment (tutorial) using Google Domains (tutorial) with SSL encryption (tutorial) and maintenance via SSH to instance VMs (such as updating PHP version in Google Cloud VM Instance). Thus it is natural to leverage Google Cloud CDN, with the added benefit that it won’t break with updates to WordPress since the CDN configuration happens server-side and not WordPress-side.

Follow along with me as we explore how to activate Google CDN for your Google Cloud-hosted service.

Read more

Tips For Building A Python Web Scraper

Automation is my hobby. Admittedly I never thought that I would be interested in it when I studied computer science and engineering back in my university days (my father said my personality befits a software engineer, and I blindly followed his advice). However, during my journey to become a competent software developer I invested much time in simple scripts to do repetitive work for me. While most of the above examples involve automating games (via something like Sikuli which can control your screen), lately I have been turning my attention to scraping websites and integrating APIs for data aggregation. This post contains some of the tips and tricks I have used in order to make your web crawler quicker and more robust.

Read more

Update PHP Version For WordPress On Debian 9

As of April 30, 2020, the current version of Google Cloud Platform’s WordPress Click-to-Deploy deploys WordPress 5.2.3 using PHP version 7.0.33. PHP 7.0.33 was released in January 10, 2019 and since then the PHP developers have released the most recent and stable 7.4.5 version. As a site administrator it is highly essential to update system versions in order to improve both security and performance.

There are many blogs – especially the article from WordPress themselves – which go into details about why updating PHP is important. Since I would be spitting out the exact same details I will not write about it here. However, pages I have visited would simply ask WordPress administrators to contact their webmaster/sysadmins to update the PHP version, which will not fly for an amateur such as myself. In addition, building from source often results in faster performance, so I took on that challenge as well. To serve as future reference, I have created a manual in the process of updating this site from PHP7.0 to PHP7.4.5. Continue on for steps on how to do it yourself!

Read more

Guide To Fade-In Effect On Scroll Into View

Did you notice this fade-in??

Many of the UI we see today, whether it’s on TV, slideshow presentations, mobile apps and many other kinds of visuals, all incorporate some form of transition to keep the user engaged. A few days ago I was designing a mock e-commerce website for a local business and spent quite some time stuck on how to implement this fade-in effect. While there are a lot of ways to incorporate fade-in effects and there are many webpages showing you how to do so, I’ve found that there are no articles which matched the exact effect I was looking for, and thus I’m putting it here for the sake of documentation and knowledge sharing.

Read on to learn more about how to incorporate fade-in of elements the moment it is partly visible in the viewport.

Read more

Simple Guide to WordPress Permalink

Update 2023-02-11 : Added an additional check (modify “apache2.conf” file) at the end of the article in the case the existing method doesn’t work.

As I was reviving this site after its two-year hiatus, I noticed that I neglected to post an article detailing how to set up WordPress permalinks. Since it requires some modifications on the server side it took a bit of trial-and-error to re-enable it. If even I could forget how to make the settings after two years, then it is definitely reason enough to make an article out of it (for my own sake!).

Read on to learn more about why and how to set WordPress permalinks.

Read more

JiyuuLife is Live Again!

 

Wow, it’s been a while!

While neglecting to publish some new posts due to being busy with work, I also overlooked the fact that after the GCP trial period ends, there is only a 30-day grace period for you to update to non-free status before they TERMINATE your compute VM. This means that while your deployment history and GCP project will still be kept, everything else – including the things you installed/changed on your VM – will be wiped.

Read more

Introduction to JiyuuLife

Greetings!

If you’re seeing this post then you must have been referred to here by me personally, clicked on a link from my social accounts, or got really lucky and came here from organic search engine results (just kidding, you are a good samaritan and it had nothing to do with luck, but it might have some to do with my SEO skills 🙂 ).

This post is an introduction to this site and outlines some of the goals and motivations of this site. 

Read more