most likely the best and most powerful blogging and web site content management system (or CMS) breathing these days.

This article assumes you’ve gota minimum of basic information of UNIX operating systemknow how to use the shell, and most significantly, you host your website on your own VPS. The installation is sort of straightforward and assumes you’re running within the root account, if not you wil got to add ‘sudo’ to the commands to induce root privileges. i will be able to show you thru the step by step installation WordPress content management systems on an Ubuntu 18.04 Server

Install WordPress on Ubuntu 18.04 LTS

Step 1. First make sure that all your system packages are up-to-date

sudo apt-get update

sudo apt-get upgrade

Step 2. Install LAMP (Linux, Apache, MariaDB, PHP) server.

A Ubuntu 18.04 LAMP server is needed. If you do not have LAMP put inyou’ll be able to follow our guide here. additionally install all needed PHP modules:

apt-get install php7.1-cli php7.1-gd php7.1-opcache php7.1-mysql php7.1-json php7.1-mcrypt php7.1-xml php7.1-curl php7.1-mysql php7.1-xml php7.1-xmlrpc

Step 3. Installing WordPress on Ubuntu 18.04 LTS.

First thing to try and do is to go to WordPress’s transfer page and transfer the newest stable version of WordPress, At the instant of scripting this article it’s version 4.9.7:

wget http://wordpress.org/latest.zip

Unpack the WordPress zip archive to the document root directory on your server:

unzip -q latest.zip -d /var/www/html/

cd wordpress
cp -a * ..

We will need to change some folders permissions:

chown www-data:www-data -R /var/www/html/

We need to create the upload directory manually:

mkdir -p /var/www/html/wp-content/uploads

Allow the Apache internet server to put in writing to the uploads directory. do that by assigning group ownership of this directory to your internet server which is able to permit Apache to form files and directories. Issue the subsequent command:

chown www-data:www-data -R /var/www/html/wp-content/uploads

Step 4. Configuring MariaDB for WordPress.

By default, MariaDB isn’t hardened. you’ll secure MariaDB using the mysql_secure_installation script. you ought to scan and below every steps carefully which is able to set root passwordtake away anonymous users, disallow remote root login, and take away the test info and access to secure MariaDB:

mysql_secure_installation

- Set root password? [Y/n] y-

Remove anonymous users? [Y/n] y-

Disallow root login remotely? [Y/n] y-

Remove test database andaccess to it? [Y/n] y-

Reload privilege tables now? [Y/n] y

Next we’ll ought to log in to the MariaDB console and build a info for the WordPress. Run the subsequent command:

mysql -u root -p

This will prompt you for a countersignthus enter your MariaDB root password and hit Enter. Once you’re logged in to your database server you wish to make a database for WordPress installation:

create database wordpress;

grant all privileges on wordpress.* to wpuser@localhost identified by 'your-password';

flushprivileges;exit;

Step 5. Configuring WordPress

In this step we’ll tack together the most configuration file of WordPress, wherever we’d like to tack together it’s basic parameters so it will be connected with the information and user:

mv wp-config-sample.php wp-config.php

Now open it using any of your favorite editor, to form any changes within the WordPress configuration file:

nano wp-config.php

Here area unit the values that we’d like to update in keeping with our previous info and user’s setup:

// ** MySQL settings - You can get this info from your web host ** //

/** The name of the database for WordPress */

define('DB_NAME', 'wordpress');

/** MySQL database username */

define('DB_USER', 'wpuser');

/** MySQL database password */

define('DB_PASSWORD', 'your_password');

/** MySQL hostname */

define('DB_HOST', 'localhost');

Step 6. Configuring Apache web server for WordPress.

Create a brand new virtual host directive in Apache. for instanceproduce a brand new Apache configuration file named ‘wordpress.conf’ on your virtual server:

touch /etc/apache2/sites-available/wordpress.conf
ln -s /etc/apache2/sites-available/wordpress.conf /etc/apache2/sites-enabled/wordpress.conf
nano /etc/apache2/sites-available/wordpress.conf

Add the following lines:

<VirtualHost *:80>

ServerAdmin admin@yourdomain.com

DocumentRoot /var/www/html/

ServerName your-domain.com

ServerAlias www.your-domain.com

<Directory /var/www/html/>

Options FollowSymLinks

Allow Override All

Order allow,deny

allow from all

</Directory>

ErrorLog /var/log/apache2/your-domain.com-error_log

CustomLog /var/log/apache2/your-domain.com-access_log common

</VirtualHost>

Next step we will need to adjust the some some values in the PHP configuration files as follow:

nano /etc/php/7.1/apache2/php.ini

Add/modify the following settings:

max_execution_time = 300

max_input_time = 600

memory_limit = 256M

post_max_size = 64M

upload_max_filesize = 64M

Now, we can restart Apache web server so that the changes take place:

sudo a2ensite wordpress.conf

sudo a2enmod rewrite

sudo systemctl restart apache2.service

Step 7. Accessing WordPress.

WordPress are going to be accessible on http port 80 by default. Open your favorite browser and navigate to http://yourdomain.com or http://server-ip/ and complete the specified the steps to complete the installation. If you’r employing a firewall, please open port eighty to modify access to the control panel.

Congratulation’s! you have got with success put in WordPress. Thanks for using this tutorial for putting in WordPress CMS (Content Management Systems) on your Ubuntu 18.04 Server. for added acilitate or helpful infowe tend to suggest you to visualize the official WordPress installation guideline .