If you’re wanting to set up your own blog on Ubuntu, then this is the video for you! In this complete walkthrough, you’ll set up your very own WordPress installation on an Ubuntu cloud instance. This walkthrough will go over launching an instance, setting up a MariaDB database, installing PHP plugins, and by the end of the video you’ll set up a certificate with Let’s Encrypt for a secure connection to your blog. This is a fun project, so definitely check it out!
Thanks to Percona for sponsoring today’s video! Check out the links below to see how they can help you retain support on MySQL 5.7 after its end of life, upgrade to MySQL 8.0, and more!
- Upgrade to MySQL 8.0 or stay on 5.7 (and get support either way)
- Get assistance with migrating to MySQL 8.0
- MySQL 5.7 EOL Support by Percona
Commands used in this video
Below is a list of commands that were used in the video, if you’d like to copy and paste during setup.
Adding a non-root user for yourself
usermod -aG sudo jay
Now that you have a user set up for yourself, be sure to log out and log in as that user before continuing.
Updating the hostname
Edit the following files in order to add your hostname or domain name to your instance.
sudo nano /etc/hostname
sudo nano /etc/hosts
Before continuing, we should make sure we have everything up to date to benefit from all current security patches for Ubuntu.
sudo apt update
sudo apt dist-upgrade
Reboot the instance
sudo apt install apache2
systemctl status apache2
Set up MariaDB
sudo apt install mariadb-server
CREATE DATABASE wordpress_db DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
GRANT ALL PRIVILEGES ON wordpress_db.* TO wordpress_user@localhost IDENTIFIED BY 'secret_password';
Download and Extract WordPress
sudo apt install unzip
sudo -R chown www-data:www-data wordpress
mv wordpress /var/www
Add a configuration file for WordPress to Apache
sudo nano /etc/apache2/sites-available/wordpress.conf
AllowOverride Limit Options FileInfo
Require all granted
Require all granted
sudo a2dissite 000-default.conf
sudo a2ensite wordpress.conf
Install additional required packages
sudo apt install libapache2-mod-php php-curl php-gd php-intl php-mbstring php-mysql php-soap php-xml php-xmlrpc php-zip
sudo a2enmod rewrite
sudo systemctl restart apache2
After all of that, access your site and then fill out form in the web browser. Then, you’re all set!