Tag archive for: WordPress

How to host a WordPress website on a Raspberry Pi with Raspbian Buster Lite and Nginx

If you are thinking of starting a blog about computer technology, then you can consider hosting a WordPress website on your Raspberry Pi.

Since Raspberry Pi is a capable machine that does not take up too much space and power, it is a good as a web server.

In addition, if you have an Internet subscription that does not block port 80 and 443, hosting a WordPress at home can be cost effective.

Given these points, let’s look at how we can host a WordPress website on a Raspberry Pi with Raspbian Buster and Nginx.

How to create a Carousel in WordPress with Slide Anything

When you have been adding content to your website for some time, you may notice two things:

  1. There are many pages that are never visited in months or even years.
  2. The home page will always have page views.

Given these points, the home page is one place where you have the chance to promote pages that are rarely seen organically.

If your website is realised by polyglot stack, then you will find the Slide Anything plugin useful for creating a Carousel for your WordPress instance.

Given that, this post shows how you can create a Carousel in WordPress with Slide Anything.

Sample Slide Anything WordPress Carousel on Techcoil home page

How to start a blog about computer technology

Previously, I wrote about why programmers should blog. When you are convinced that you should blog as a programmer, you may wonder how to start a blog.

In order to have a place to refer people who wants to learn more about this topic, I write my experience in this article.

Given that in mind, this is how you can start a blog about computer technology.

CSS styles for styling image alignment in your WordPress pages and posts

When you create your own WordPress theme, one of the things of provide for is the ability to style image alignments.

By default, the WordPress Editor will include one of the predefined CSS classes when we add images to a post or page.

Therefore, by providing the CSS styles for each of these classes, we will be able to style the image alignment of our WordPress pages and posts.

Given these points, let us look at the CSS styles for styling image alignment in our WordPress pages and posts.

How to allow arbitrary Widget content to be added to sections of your WordPress theme

When you use WordPress to house your thoughts, you get the flexibility to update sections of your WordPress site through the WordPress dashboard.

For example, I can change the content within the sticky portion of my sidebar as and when I need to. Such content can be provided through the various WordPress Widgets that are available in my WordPress installation.

So how can we mark sections of our WordPress themes for displaying Widget content?

With this in mind, let us look at how we can allow arbitrary Widget content to be added to sections of our WordPress theme via the WordPress dashboard.

Implementing Google Custom Search as a WordPress page without using any plugin

Creating a search engine to search content across a polyglot website is not an easy task. In order to do that, you need to either:

  • take a search query and match it across data repositories from different application processes, or
  • have a process that will maintain an index of content from the different applications and search within that content.

Since Google had indexed most of the content in the Internet, Google Custom Search can be the easiest way for us to implement site-wide search. In addition to fast searching, Google Custom Search also comes with AdSense monetization.

In case you need it, this is how you can implement Google Custom Search as a WordPress page without using any plugin.

How to create a custom page template in WordPress

We use pages in WordPress to hold content of our website that are not specifically time-dependent.

Examples of such content at Techcoil include the about page, disclaimer page and Raspbian Stretch Lite project ideas.

When you want to show content in different page layouts, you can create different customized page templates to show content in different ways.

In case you need a reference, this post describes how to create a custom page template in WordPress.

Why should programmers blog?

One of the big words on the Internet nowadays is the word ‘blog’. As a noun, this word refers to a website or web page that is updated regularly by an individual or a group, written in an informal or conversational style. What you are reading now is an example of one. As a verb, it refers to the act of adding new content to a blog.

Ever since I started this blog on 14 November 2010 on a self-hosted WordPress instance, I had never stop adding content to it.

Since then, I often came across programmers asking why they should blog. To help them get started, here are some reasons for programmers to blog.

Setting up WordPress on Raspberry Pi Zero W with Raspbian Stretch Lite, Nginx, MariaDB and PHP as the LEMP stack

A Raspberry Pi Zero W is a small and capable computer that included a Wi-Fi chip for projects that requires an Internet connection.

Apart from running client programs on the Raspberry Pi Zero W, it is equally capable of being a web server. Since I had a spare Raspberry Pi Zero W lying around the house and there are good reasons to blog as a programmer, I decided to use it as a WordPress server to collect content for a new blog project.

This post documents how I setup WordPress on a Raspberry Pi Zero W with Raspbian Stretch Lite, nginx, MariaDB and PHP as the LEMP stack.