Tutorials and Resources

the linux-ch.at workflow wiki

User Tools

Site Tools



In this tutorial, we will go over step by step instructions on adding a Wordpress instance to your server. Relax, it's easy. In this tutorial I am installing on a Debian 9 stretch installation, the same distro we use here at linux-ch.at - This tutorial should work fine for any Debian based distro i.e. Ubuntu, Raspian, etc.

Create a user and database

First you need to set up a Lamp Server. Once that is running proper, open mysql

  # mysql -u root -p

Then we'll go ahead and create a regular user for WordPress.

  MariaDB [(none)]> CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'userpassword';

Now we'll create a WordPress database.

  MariaDB [(none)]> CREATE DATABASE wp_database;

Grant your user all permissions on the database, flush permission and exit mysql

  MariaDB [(none)]> GRANT ALL ON `wp_database`.* TO `wpuser`@`localhost`;
  Flush your privileges and exit.
  MariaDB [(none)]> FLUSH PRIVILEGES;
  MariaDB [(none)]> exit;

Download WordPress

Here's where WordPress makes its entrance. You can either head over to the https://wordpress.org and download it that way, or just use wget. The URL never changes, so wget will always work.

  $ cd Downloads
  $ wget https://wordpress.org/latest.tar.gz

Unpack WordPress using tar.

  $ tar xpf latest.tar.gz

The resulting folder will be wordpress. It contains the entire WordPress install. How and where you copy it is entirely up to you and depends on your web server configuration. The example provided covers the most basic possible install on Apache.

  # rm -rf /var/www/html
  # cp -r wordpress /var/www/html

Set up permissions

If you're using Nginx, you probably just want to place the folder in /var/www/ as it is, and point your configuration at it. When WordPress is where you want it, change the permissions and ownership to improve security and grant your webserver proper access.

  # chown -R www-data:www-data /var/www/html
  # find /var/www/html -type d -exec chmod 755 {} \;
  # find /var/www/html -type f -exec chmod 644 {} \;

Certainly, if your webserver is configured to run under a different user, change the persmission accordingly.

Front end config

This ends the 'command line' portion of this process. The rest can be setup from your Wordpress frontend. So, open up a web browser and navigate to the domain name or IP address of your server.

The first screen will greet you. Click 'Let's Go' to proceed.

Enter all of your information exactly as you did in mysql.

Success! Make sure you write down your username and password for later as this will how you login to your Wordpress instance from now. To navigate to the Wordpress login go to yourserver.com/wp-admin


See, that was easy like Sunday morning, wasn't it? Feel free to e-mail me apollo@linux-ch.at and I will assist you when I get a chance :)

set_up_a_wordpress_instance.txt · Last modified: 2018/02/02 06:46 by