Select Page
How to install WordPress on Google Cloud

How to install WordPress on Google Cloud

You are reading this post thanks to Google Cloud. To be honest, I’ve installed this blog “unexpectedly” while testing some features of Google Cloud. Possibility to try WordPress using Google Cloud pushed me finally to fill my empty domain with this blog. It took me just a few minutes.

Few words about Google Cloud

Google Cloud Platform, offered by Google, is a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products, such as Google Search and YouTube. Alongside a set of management tools, it provides a series of modular cloud services including computing, data storage, data analytics and machine learning (Wikipedia)

You can install WordPress in Google Cloud in a few minutes. WordPress is a part of Compute Engine in Google Cloud. If you want to try it just use Cloud Launcher. You’ll find there WordPress icon.

Using this method you can install WordPress in a few minutes. It will deploy new virtual machine and after few minutes you’ll get web server with WordPress installation. In Google Cloud console you’ll find all credentials (access to SSH, mysql access, PhpMyAdmin, WordPress generated passwords etc).

With recommended WordPress installation you’ll get virtual machine with Apache HTTP Server 2.4.+, MySQL 5.5.+
and PHP 5.6.+. Quick tip, you can use also virtual machine with WordPress certified by Bitnami which is using for example newer version of MySQL 5.7 and PHP7. It is also cheaper but we’ll talk about prices later.

How to install WordPress in Google Cloud

Let’s start from the beginning and install WordPress certified by Bitnami

Go to Cloud Launcher and select WordPress certified by Bitnami.

Click Launch on Compute Engine. You should see the form that is visible on the screenshot below. You’ll see there also price estimation (and like I said, we’ll get to this point (pricing) later. Just make sure to select us-centra1-f and small machine.

Machine type small will give you 1 shared vCPU and 1.7GB which is OK for simple blog. I tried micro (1 shared vCPU, 0.6 GB memory, f1-micro) but this machine was to weak to run my blog without problems. It was working but I’ve got problems with database connections, editing posts sometimes. Just go with small plan at start.

Click deploy and you’ll see that Google is preparing your machine

It will took just a minute and you’ll get all info you need to login to your WordPress installation.

And it’s done! You’ll get URL to your machine and WordPress running. All you need to do right now it to redirect your domain to this URL. Simple, right? With Bitnami version of WordPress you’ll get installation with

Configure your domain and SSL certificate

I’ve create seperate blog post how to get SSL (HTTPS) for your blog for free with Cloudflare: How to get free SSL certificate (HTTPS) for free? If you want to use Cloudflare it’s good to install Cloudflare plugin to your WordPress instance before activating SSL on your domain. This should fix issues with potential redirect loop.

Benefits of hosting your blog on Google Cloud

As always, there are pros and cons. Let’s start from good things.

  1. Scalability
    With cloud you are paying for the CPU usage/traffic. If you are running site with big traffic – it can be quite a good choice.
  2. Security
  3. Guaranteed uptime
  4. Custom configuration
    If you want to change defaults (Apache, PHP parameters etc), some server settings, it’s not always possible when you are at shared hosting provider. You have the complete control over what you want to do with your machine instance. You don’t have to depend on a single shared server to host your site.

Pricing

I don’t want to put “pricing” to cons (right now). For small blog, probably it’ll be much more expensive than a standard shared hosting you can get. Let’s be honest – Google Cloud wasn’t created only to serve WordPress blogs and it’s not the best example to showcase it.

I want to git it a try for a few months and we’ll see. Right now with small machine current pricing plan is not the cheapest solution you can get. I read that it’s possible to optimize g1-micro virtual machine for sites like this (with very low traffic).

Updated: 23.07.2018

I switched to micro plan and I’m able to host my blog without any cost right now.

 

 

How to get free SSL certificate (HTTPS) for free?

How to get free SSL certificate (HTTPS) for free?

If you are setting up any website today SSL certificate (https://) is a must have. July 2018 will be a game changer and you should be prepared for this date.

While I work in mobile right today I’m getting questions about this because I spent many years working with web and still I’m trying to be up-to-date with new web technologies and trends. This kind of knowledge is also very useful in mobile because web and mobile are connected and this connection in my opinion is getting closer and closer (see PWA, Instant Apps, Flutter…).

(Let’s get to the point) Let’s say you’ve got website without SSL (HTTP) and you are afraid you’ll get some penalty for not having SSL. Is this true? What will happen in July 2018?

Take a look at Google Security Blog and post from February 2018:

For the past several years, we’ve moved toward a more secure web by strongly advocating that sites adopt HTTPS encryption. And within the last year, we’ve also helped users understand that HTTP sites are not secure by gradually marking a larger subset of HTTP pages as “not secure”. Beginning in July 2018 with the release of Chrome 68, Chrome will mark all HTTP sites as “not secure”.

What is also important, this will be additional factor for Google Search results (SEO). If you want to keep top positions in Google’s search results – keep it in mind.

How to add SSL (HTTPS) to my site? 

Let’s just simplify this:

  • You can probably buy SSL certificate at your hosting provider (as your hosting provider)
  • You can get free certificate from https://letsencrypt.org/ and install it on your server (ask your hosting provider how to do it and what is important – ask if this is possible. I know that not all hosting providers are allowing to do that – because for example they want to sell you one…)
  • Use Crowdflare service for free and move your website to HTTPS in a minute

 

I’d like to focus on Cloudflare

Cloudflare provides content delivery network services, DDoS mitigation, Internet security and distributed domain name server services, sitting between the visitor and the Cloudflare user’s hosting provider, acting as a reverse proxy for websites.

It may sound like a sponsored article but it’s not. Cloudflare is really great service that can help you in many ways:

  • Stop attacks directed at a website
  • Dynamically modify content in order to improve performance
  • Insert applications into web pages
  • Provide rich analytics on all the requests to your website
  • Automatically determine what objects are static and cacheable at the network’s edge without any user configuration
  • Provide a network gateway between protocols like IPv6 \<-> IPv4
  • Make installing SSL flexible and one-click easy
  • And many more things a traditional CDN can’t provide….

How to set up your domain with Cloudflare?

Read this FAQ tutorial to know how to move your domain to Cloudflare. This is starting point for the service. Once you have it – you can try to use and test it’s features. Just start with Free service

Once you have. Your domain is active at Cloudflare. How to turn on SSL?

Just go to Crypto tab and enable SSL (Flexible can be good start point, for blog, landing page – you can start using it without a problems)

Is that all?

Just check your website and other option in Crypto

If you have mixed content you want to enable also Automatic HTTPS Rewrites and if you want to make HTTPS your default URL Always use HTTPS

That’s it. Check your website, you should see SSL confirmation

So it’s just a friendly reminder for July 2018 and make your users more secure.