Install WordPress on Linux Ubuntu or Debian

Assumptions:

  • A working Debian or Ubuntu server (ideally headless)
  • A working knowledge of Linux (view this post for some useful commands)
  • A standard Linux account preconfigured
  • Apache 2 installed and configured correctly
  • Ideally a preconfigured vhost (not required but a good idea, refer to this post)
  • PHP5 installed and configured correctly
  • mySQL installed and configured correctly
  • A valid domain name
  • Firewall rules allowing port 80 traffic from the internet to the internal Apache server
  • A records for the domain pointing to the outside static IP address of the Apache servers internet connection

Procedure:

Install WordPress

1. Log into the server using a standard Linux account (Ideally Putty to terminal)

2. Elevate to root privileges

3. Make a folder to hold WordPress in a temp area

4. Change to temp location

5. Download the latest WordPress source installation files

6 Extract files

mySQL Configuration

7. Log into mySQL (this will be your Root mySQL password, not the root of your Linux box)

8. Create database (call it the same as your site)

9. Create mySQL user (Change “username” to something other than username – it will only be used to authenticate to mySQL)

10.  Set the password for the username (Change password123 to something else)

11. Grant privileges for the new user to the database

12. Refresh mySQL

13. Exit mySQL

WordPress Configuration

14. Copy WordPress same configration file to a working file

15. Open configuration file (refer to this post for a reference to VI)

16. Find the following following lines:

Change “wordpress” to the database name you created in step 8
Change “wordpressuser” to the username you created in step 9
Change “password” to the password you created in step 10

17.  Save and exit

Loading WordPress to Apache

18. Change to the WordPress temp folder

19. Create new site folder (change”newsite.com” to the domain name of your site)

19. Move all WordPress files from the temp location to the active location

20. Give ownership rights

Apache Configuration

21. Install php5-gd

MySQL Configuration

22. Install php5-mysql

Rewrite

23. Run the Apache rewrite

Testing

Browse to the site http://example.com/wp-admin/install.php

Conclusion

This was a quick write up on how to install WordPress on Ubuntu or Debian.

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.

Keywords: Install, WordPress, Linux, Debian, Ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.