Wednesday, October 4, 2017

Debian Linux Stretch - Installing WordPress

Ok, earlier I installed Debian Linux Stretch using this guide.

It was wordy because I wrote it, and it had 26 steps because I wanted to make it absolutely as easy as making breakfast.

It worked because this is being written on that machine.


Next I installed the LAMP stack using this guide.

Not so wordy, and again, that's this machine.  LAMP is a web server, and if you're coming here to find out how to install WordPress, you already knew that.


Now I am getting ready to install Wordpress.  I'm doing it as I am writing, so assuming I have the right information to guide me, I'll have success.  I am using this guide to help me.  Also if I haven't made a thorough hash of installing LAMP, it should "Just Work".

WordPress is a pretty easy install, I've done it before on a Cloud Server, and I've done it before on a machine here, and a couple of random places in the past.

My install here expects a few basic things.
  • You followed my guides to build the server and it is running.
  • You have physical access to the server to simplify the process.
  • Commands will be run from the terminal as root.

Creating the database for WordPress:

A) Log In as Root to Mysql or MariaDB
  • mysql -u root -p
B) Create a regular user for WordPress- replace userpassword with a much better password!
  • CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'userpassword';
C)  Create wp_database
  • CREATE DATABASE wp_database;
D) Grant the WordPress User full access to the wp_database
  • GRANT ALL ON `wp_database`.* TO `wpuser`@`localhost`;
E) Flush your privileges and exit MySQL/MariaDB
  • FLUSH PRIVILEGES;
  • exit;

Get WordPress and Unpack it

A) Download the package into your ~/Downloads directory
  • cd Downloads
  • wget https://wordpress.org/latest.tar.gz
B) Unpack the package into the WordPress directory
  • tar xpf latest.tar.gz
C)  Remove everything in your web server's html directory and copy the WordPress package to it. 

  • REMEMBER:  If you have anything important in that /var/www/html directory it will be gone so back it up if you need it
  • rm -rf /var/www/html
  • cp -r wordpress /var/www/html
D) Set permissions and ownership for the WordPress install to function as designed.
  • 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 {} \;

Set Up WordPress

A) Access the process.  The WordPress setup is Browser Driven.  Surf to your localhost, or the correct web address URL to get to it.  In my case it is in Firefox:

  • http://localhost/wp-admin
 B) Supply wp-admin the correct information.  In my case:

  • Language: English
  • (OK)
  • (Let's Go)
  • Database: wp_database
  • Username: wpuser
  • Password: userpassword (Yes, Literally 'userpassword' or your better password)
  • Database Host: localhost
  • Table Prefix: wp_
  • Click Submit 
 
C) Run The Install by clicking the button.


The Five Minute WordPress Install Process

At this point, you launch into an install to create the basics for your WordPress website.

A) Information Needed:

  • Site Title - This is the name of the site you wish to create.
  • Username
  • Password
  • Confirm use of weak password if this box appears.
  • Your Email
  • Search Engine Visibility (Click the check box if you do not want to show in searches)
  • Click (Install WordPress) button
B) The Success page will show you your WordPress username and indicate your chosen password for you to proceed.
  • Click Log In

Now you can do a happy dance.  You're done.  Go create a site.

WordPress will put a red button up for each thing that it needs to have updated.

At this point you may be creative and make a site.  You may want to explore templates, but a basic site can be slapped together quickly.

The results are that if you are on that machine, and surf http://localhost you will get a basic page with the information that you put in.

On the other hand, this is not perfect.  I surfed it from my phone and another computer here, and I got all the text but not the template.  So you will probably have some configuration to do.

But... This is good enough to get started.

No comments:

Post a Comment