This article covers setup WordPress — including Apache, MySQL, and PHP, on the Ubuntu Linux server. WordPress is the most popular CMS (content management system) on the internet. It allows you to easily set up flexible blogs and websites on top of a MySQL backend with PHP processing. WordPress has seen incredible adoption and is a great choice for getting a website up and running quickly. After setup, almost all administration can be done through the web frontend.
How to install PHP Extensions on Ubuntu?
1. You can download and install some of the most popular PHP extensions for use with WordPress by executing the commands:
$ sudo apt update
$ sudo apt install php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip
2. Then restart Apache to load these new extensions in the next section.
If you are returning here to install additional plugins, you can restart Apache now by running:
$ sudo systemctl restart apache2
To install WordPress on Ubuntu:
1. Change into a writable directory and then download the compressed release by typing:
$ cd /tmp
$ curl -O https://wordpress.org/latest.tar.gz
2. Extract the compressed file to create the WordPress directory structure:
$ tar xzvf latest.tar.gz
3. Add a dummy .htaccess file so that this will be available for WordPress to use later.
Create the file by typing:
$ touch /tmp/wordpress/.htaccess
4. Copy over the sample configuration file to the filename that WordPress actually reads:
$ cp /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php
5. Create the upgrade directory, so that WordPress won't run into permissions issues when trying to do this on its own following an update to its software:
$ mkdir /tmp/wordpress/wp-content/upgrade
6. Copy the entire contents of the directory into our document root:
$ sudo cp -a /tmp/wordpress/. /var/www/wordpress