Showing posts with label WordPress. Show all posts
Showing posts with label WordPress. Show all posts

Wednesday, November 8, 2017

Debian Linux Stretch - Backup or Restore Your Blog or Website Into Your New Server Using Blogger or Wordpress

Writers will understand this.

Have you ever meant to write something but had no idea what to call it?  This is where I am at.

Basically these instructions will work with Blogger or Wordpress.
It will work with any operating system because both of those are Cloud based.
Wordpress may be "local" or on the cloud.

I tagged this with Debian because it's a logical endpoint for a series of articles that I wrote here about how to create a Debian Web Server with Wordpress so that you can muck about with your systems.

Blogger is only blogs, but these instructions for Wordpress may be used for entire websites if you are working with Wordpress only.

First: Export your Blog or Website

Blogger:

  1. Log in, 
  2. Go to the Settings page
  3. Select Other
  4. Click on the button to "Back up content"
  5. Click on "Save to Computer"
  6. Tell the browser where to save the file.
  7. Success!


Wordpress:

  1. Log in to your wp-admin page
  2. Click on "Tools"
  3. Click on "Export"
  4. Click on "Start Export" button
  5. Choose What To Export.  "All Content" is most likely.
  6. Click on "Download Export"
  7. Go to your email account that is specified in the message and follow the link to download your blog's content.


Second: Import your Blog or Website

Blogger:

  1. Log in, 
  2. Go to the Settings page
  3. Select Other
  4. Click on the button to "Import content"
  5. Check the box saying "I am not a Robot"
  6. Check the box saying "Automatically Publish"
  7. Answer the annoying Capcha and click the appropriate pictures
  8. Click on "Import from Computer"
  9. Tell the browser where to find the file.
  10. Success!

Wordpress:

  1. Log in to your wp-admin page
  2. Click on "Tools"
  3. Click on "Import"
  4. Click on the link for the kind of blog you want to "Run Importer
  5. Click on "Browse" to Choose File to import.
  6. Find your file on your computer.  
  7. Assign Author, Click the box saying to "Download and Import File Attachments"
  8. Click on "Submit"
  9. Success!  But note that the information will be in which ever template that you had chosen for the install of the Wordpress software.  You will probably want to adjust that as needed since it probably does not match the original blog.
All this will take a while, go pet your dog, or make coffee.
 
At this point your server will have your blog or website. 
In my case, it's local so I can make changes to my look and feel without harming my "production" website.
That new site can be anywhere, it could be on Wordpress on the cloud.

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.