How To Install WordPress on Linux

by Ismail.EL
0 comment


How To Install WordPress on Ubuntu

1. Introduction :

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.
in this article I show you how to install wordpress ubuntu with the apache web server step by step 🙂

2. Prerequisites :

Additionally, you’ll need to have a LAMP (Linux, Apache, MySQL, and PHP) stack installed on your VPS.for installing a LAMP you can use this guide to learn how to “install LAMP on Ubuntu”.

3. Create a MySQL Database and User for WordPress :

We have MySQL installed (install mysql server), which can provide this functionality, but we need to make new database with the name “wordpressdb” and new user with the name “wpuser” for the WordPress installation. You can do that with the commands below.

NB: Replace ‘wpuser_password’ with a secure password that will be used ass access credentials for the new WordPress database.

4. Download WordPress :

Next, we will download the actual WordPress files from the project’s website. we can get the most up-to-date version of WordPress by typing this:

We can extract the files to rebuild the WordPress directory we need by typing:

This will create a directory called wordpress in your home directory.

5. Copy Files to the Document Root in apache  :

We can transfer our WordPress files there by typing

Now change the owner for WordPress files to the user and group www-data, usually all files under /var/www/html/wordpress directory are owned by www-data user and group. Run these commands to change the file and directory ownership:

6. Configure WordPress :

Begin by moving into the WordPress directory:

Then rename the file wp-config-sample.php to wp-config.php, and edit the file to set the database name, database user and password that we created during the database setup.

// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘wordpressdb’);/** MySQL database username */
define(‘DB_USER’, ‘wpuser’);/** MySQL database password */
define(‘DB_PASSWORD’, ‘wpuser_password’);

7. MySQL extension which is required by WordPress :

And restart apache web server

8. Complete Installation through the Web Interface :

http://server_domain_name_or_IP/wordpress

OR

http://Server_Adress_IP/wordpress

Please choose your language, example: English(United States) and press the button Continue:

Now fill in the username, password that shall be used to authenticate the WordPress administrator and your email address and press the Install WordPress button:

WordPress will confirm the installation, and then ask you to log in with the account you just created:

Click “Login” button and then fill out your account information:

How To Install wordpress in apache with ubuntu_4

You will be presented with the WordPress interface:

5. Conclusion

In this post, i have explained How To Install WordPress on Linux.
If you have any questions or feedback, feel free to leave a comment.
As always, if you found this post useful, then click like and share it 🙂

20100cookie-checkHow To Install WordPress on Linux

Related Posts

Leave a Comment