×
Community Blog How to Use Wordpress? Hosting, Website, Plugins, Cache

How to Use Wordpress? Hosting, Website, Plugins, Cache

Learn how to use wordpress to build a website on cloud server and get web hosting. The article will also show you some best plugins to make your wordpress website better.

WordPress with LEMP on Alibaba Cloud – Part 1 Provision and Secure an Ubuntu 16.04 Server

This is the first tutorial of a series that will culminate with a fresh WordPress site running on an Alibaba Cloud ECS Instance running a highly performant LEMP Stack.

In this tutorial, we will create an instance running Ubuntu 16.04, and then secure the server by creating a superuser and disabling root login, and finally configuring the Ubuntu UFW (Uncomplicated FireWall).

The next tutorial will lead you through the process to complete a modern LEMP stack, with the highly performant combination of NGINX, MariaDB, and PHP7.

The third tutorial in the series will run through Domain Management for your site, adding DNS records, and installing a Let’s Encrypt SSL certificate.

In the final tutorial we will be installing WordPress via both the WordPress Command Line (WP-CLI), and by using wget/curl.

These tutorials assume that you have already registered your account with Alibaba Cloud and, having verified your payment method, you are ready to proceed with provisioning a server from the Alibaba Cloud Console:
Alibaba Cloud Console

From the screenshot above you can see the Elastic Compute Services (ECS) link in the top right of the main products and services panel. Click that link to move through to the ECS Overview Panel, as seen below:

ECS Overview Panel

At this point it may seem natural to move directly on to provisioning an instance. You can do this, either by clicking the instances link on the horizontal menu to the right, or by clicking the shopping cart links located at the top right of the server location panel you are interested in.

Related Blogs

How I Built My Personal Website with Alibaba Cloud

In this article, I will be sharing my experience of building a high-performance LEMP stack on Alibaba Cloud for my personal website.

In today's post, I'm going to show you how I deployed my website, sarathy.tech, on Alibaba Cloud.

I built my website using WordPress on Alibaba Cloud Elastic Compute Service (ECS) instance with Nginx, PHP 7.2, FastCGI, MariaDB, and Redis caching for maximum performance.

Before you get started, I'm assuming that you already have a basic understanding of the cloud, networking, and knowledge of Linux command line.

You also need a functional domain name for your website.

Step #1: Create a New Account

If you don't have an account already, you can sign up here. New users can enjoy $300-$1200 worth in free trial, valid for 2 months. If you are not sure how to do this, refer to this tutorial.

After setting up an account, you're ready to deploy a high performance WordPress website!

Step #2: Create a New ECS Instance

Log In into Alibaba Cloud Console by entering your Email and Password. You may need to enter a security code for security purposes.

In the Alibaba Cloud Console, click Products and select Elastic Compute Service from the list.

Click Instances, and choose your Region from top left drop-down menu. A list of available regions will be displayed.

Click Create Instance. For my instance, I have selected the following configurations.

  1. Billing method: Subscription
  2. Instance Type: IO Optimized
  3. vCPU: 1
  4. RAM: 4GB
  5. Family: Balanced Type mn4
  6. Quantity: 1 Units

I have selected an IO Optimized instance with 4GB of physical memory (RAM) and 1 virtual CPU. If your website will be hosting more dynamic content, consider purchasing a higher-spec instance.

Now you have to select an appropriate Image for your instance. I have chosen an Ubuntu 16.04 image for my server.

  1. Image Type: Public Image
  2. Operating System (OS): Ubuntu
  3. OS Version: 16.04 64bit

Enable Security Enhancements. This feature will add some security features like backdoor detection, remote login alerts, etc.
There are a few other configurations to consider, I have chosen the default settings for the rest.

Advanced WordPress Management Using WP-CLI on Alibaba Cloud ECS - Part 1

This three-part tutorial walks you through setting up WordPress advanced management with WP-CLI. Part 1 focuses on setting up WP-CLI on Alibaba Cloud ECS.

WordPress is the most popular content management system used to develop websites with dynamic content on the web. Much of WordPress's popularity has been gained due to the ease of use that it provides by it's Graphical User Interface (GUI). WordPress has always provided a full feature set in a package that is easy for beginners to get started.

Since its early days as a blogging platform it has evolved into a much more widely used resource, often being used for large e-commerce sites, enterprise sites, social networks, and more. Part of its progress into a platform used by more serious developers, was the introduction of WP-CLI - the official WordPress Command Line Interface.

The Command Line Interface (CLI) has long been popular with developers due to the speed and efficiency with which you can perform tasks on your machine. Using a wide variety of tools, developers have boosted their productivity and sped up their development process. The WP-CLI affords WordPress developers and site maintainers the same benefits and efficiencies.

WP-CLI is now an officially supported project of the WordPress foundation and has it's own site and developers handbook, you can find a full list of all it's commands and tools here.

This is the first in a 3-part series that will take a deep dive into the advanced WordPress management abilities provided by WP-CLI. In this tutorial we will look at installing WP-CLI on your instance, and preparing the correct permissions and user roles for it to work properly, after that we will see how it can be used to manage your WordPress content. In the following tutorials, we will dive deeper into more advanced functionality, such as managing your themes and plugins, media, users and database. Before finally showing you how it can be leveraged to manage hundreds of sites across all of your Instances, speed up development of custom plugins and themes, and even extended to provide custom functionality by creating your own commands.

Through effective use of WP-CLI you will see how you can even reduce bloat of your WordPress sites through the removal of the need for several widely used plugins.

This tutorial assumes you already have an Alibaba Cloud ECS Instance provisioned and with one (or several) WordPress sites running on it.

Throughout the series, I will be using my superuser 'new_user' and will be issuing 'root' commands using the sudo command. When you follow the commands please remember to replace my user with your own.

I will also be using my test domains 'an-example-domain.com' and 'another-example-domain.com' in the code examples, remember to replace my site domains with your own when you issue the commands.

Configuring NGINX FastCGI Static Page Caching & Final Load Testing

In Part 1 of this series about Caching solutions for WordPress on the Alibaba Cloud we set up server monitor and ran some load testing on the server to take performance benchmarks for our server prior to enabling any caching.

We then set up a Redis server on our Alibaba instance and configured it to work as an Object cache for our WordPress site, this reduced the database queries that are one of the biggest performance bottlenecks for WordPress.

The other major performance bottleneck for WordPress is caused by processing PHP, therefore in order to further improve the performance of our site, we need to reduce the amount of PHP that our web server has to process.

This is where page caching comes in.

Page Caching

Object caching can seriously improve your WordPress site's performance by optimizing the process of querying the database, but there is still a lot of overhead when serving a page request since the server is required to process PHP.

This overhead is caused by WordPress and PHP needing to build the requested HTML page on every single page load. We can reduce this drain on server resources by caching the HTML version of the requested page once it has been built, then on the next request for this page we simply serve the cached HTML page and can avoid hitting WordPress or PHP altogether.

This type of static page caching is especially useful on sites where the content for each page rarely updates.

There are different options available for static page caching however, so first let's consider our options.

NGINX FastCGI caching vs Varnish caching

Varnish Cache is a well respected web application accelerator also knowns as a caching HTTP reverse proxy. Basically, you install it in front of any server (in our case NGINX) that speaks HTTP and it will cache the returned contents of any page requests.

It is really, really fast.

The reason I have chosen to use NGINX FastCGI caching over Varnish caching in this series is because Varnish doesn't support the HTTPS protocol, and NGINX FastCGI caching is approximately as fast.

Our WordPress site has been configured to use a Let's Encrypt SSL to benefit from the advantages of HTTP2 that are only available via HTTPS. Therefore, to use Varnish cache we would need an HTTP terminator sitting in front of it to intercept and decrypt HTTPS page requests on port 443 before passing them to the Varnish cache. We could use NGINX for this purpose, but we must ask whether this increased complexity is worthwhile.

Here are two diagrams that clearly illustrate why I chose to forgo Varnish caching for NGINX FastCGI caching:
NGINX FastCGI caching

Related Courses

Use Simple Application Server to Deploy Wordpress Website

Simple Application Server is a new generation computing service for stand-alone application scenarios. It provides one-click application deployment and supports all-in-one services such as domain name resolution, website publishing, security, O&M, and application management. This optimizes the user experience of setting up a simple application and makes it easier for entry-level users to use cloud computing products.

Quickly Build A WordPress Website Using Resource Template On The Cloud

In this Clouder lesson, you will learn how to conveniently publish a WordPress website with a set of prescribed scripts using Alibaba Cloud ROS service.

To find out more detail about ROS, please access:
https://www.alibabacloud.com/product/ros

Related Documentation

Deploy WordPress with MySQL

This topic describes how to deploy a WordPress site with a MySQL database on Kubernetes.

Prerequisites

  1. You have created a Kubernetes cluster. For more information, see Quickly create a Kubernetes cluster.
  2. You know how to create PVs and PVCs. For more information about PVs, see Use Alibaba Cloud disks as volumes, Use Alibaba Cloud NAS as volumes, and Use Alibaba Cloud OSS as volumes. For more information about PVCs, see Create a Persistent Volume Claim. In this example, two PVs are created from cloud disks. The PVs are then bound to PVCs named wordpress-pv-claim and wordpress-mysql-pv-claim respectively in wordpress and wordpress-mysql YAML files.

wordpress-mysql YAML files

Use OSSFS data volumes to share WordPress attachments

This document introduces how to share WordPress attachments across different containers by creating OSSFS data volumes in Alibaba Cloud Container Service.

Scenarios

Docker containers simplify WordPress deployment. With Alibaba Cloud Container Service, you can use an orchestration template to deploy WordPress with one click.

Solutions

This document introduces how to use OSSFS data volumes of Alibaba Cloud Container Service to share WordPress attachments across different containers, without any code modifications.

OSSFS data volume, a third-party data volume provided by Alibaba Cloud Container Service, packages various cloud storages (such as Object Storage Service (OSS)) as data volumes and then directly mounts them to the containers. This means the data volumes can be shared across different containers and automatically re-mounted to the containers when the containers are restarted or migrated.

Related Market Products

WordPress powered by Websoft9(LAMP | CentOS7.3)

Websoft9 WordPress is a pre-configured, ready to run image for running WordPress on Alibaba Cloud.

WordPress on LEMP Ubuntu16.04

This image is built with Ubuntu16.04 64bit and bundled with following popular software for web service solution. In order to display web pages to our site visitors, we employ Nginx, a modern, efficient web server. Optimized to add your security concern.

Related Products

Simple Application Server

Simple Application Server is a new generation computing service for stand-alone application scenarios. It provides one-click application deployment and supports all-in-one services such as domain name resolution, website publishing, security, O&M, and application management. This optimizes the user experience of setting up a simple application and makes it easier for entry-level users to use cloud computing products.

Cloud Web Hosting

Alibaba Cloud provides available and flexible web hosting solution, which is easy to use, supports wide range of CMS, high security protection and data reliability.

0 0 0
Share on

Alibaba Clouder

2,605 posts | 747 followers

You may also like

Comments