I have limited experience with wp-cli but I know it’s a really quick and convenient way to manage WordPress installations. And recently I’ve been using ssh to to manage my sites more often, so I thought it would be a good time to investigate it more deeply.
I’m hosting this site on Dreamhost.com (my host since 2009), and I recently went through their One-Click install to quickly add WordPress here. But, strange thing is, I didn’t receive an email from them with my username/password combination – so I had no way to login (at first).
After a quick Google search, I noticed that Dreamhost has a page about resetting your password – including a section on using wp-cli.
I have limited experience with wp-cli but I know it’s a really quick and convenient way to manage WordPress installations. And recently I’ve been using ssh to to manage my sites more often, so I thought it would be a good time to investigate it more deeply.
Here’s a list of the very first commands I’m running on my new WP install – as well as some I intend to put to greater use in the future.
Login
First of all, we need to ssh into the server and access the site.
$ ssh username@site.com $ cd site.com/wordpress
Change user password
$ wp user list +----+-------------+---------------+------------------+---------------------+---------------+ | ID | user_login | display_name | user_email | user_registered | roles | +----+-------------+---------------+------------------+---------------------+---------------+ | 1 | myusername | myusername | user@example.com | 2018-03-17 11:14:28 | administrator | +----+-------------+---------------+------------------+---------------------+---------------+ $ wp user update 1 --user_pass=NewerBetterStrongerPassword123$ Success: Updated user 1
Create an alias to check for updates
One of the coolest things I found was that you can create an alias to run a series of wp-cli commands one after the other. The following command will check for WP core, plugin, and theme updates at once.
$ alias check-all='wp core check-update && wp plugin list --update=available && wp theme list --update-available' $ check-all Success: WordPress is at the latest version. +------+--------+--------+---------+ | name | status | update | version | +------+--------+--------+---------+ +------+--------+--------+---------+ +-----------------+----------+--------+---------+ | name | status | update | version | +-----------------+----------+--------+---------+ | twentyfifteen | inactive | none | 2.0 | | twentyseventeen | active | none | 1.7 | | twentysixteen | inactive | none | 1.5 | +-----------------+----------+--------+---------+
Update and manage core, plugins, & themes
While I could probably create another alias to update everything at once, I haven’t yet because I still like to do some things step-by-step. So, here are the three commands needed to update or manage WP core, plugins, and themes:
Many of the plugin and theme commands are quite similar and you can do certain things like stringing together some of them (wp theme install theme-name --activate).
Check your config file or databases
A couple more useful commands are to check out your wp-config file’s constants and globals, and work with your database:
$ wp config get
$ wp db size --tables $ wp db optimize $ wp db repair $ wp db export filename.sql
Clean up post revisions
Sometimes you just need to clean up your post revisions, especially if your site is old or has loads of them. But first, you’ll need to install an additional wp-cli package.
This one looks to be a great help, especially for big installations that get a lot of spam. But there are quite a few other commands to help manage comments.
$ wp comment delete $(wp comment list --status=spam --format=ids)
This post originated as “A Simple Roadmap to Get Up & Running with WordPress”, but it gradually morphed into something a tad more complex. So here is “A Comprehensive Overview of WordPress Site Owner Roles.”
While this post originated as “A Simple Roadmap to Get Up & Running with WordPress”, it gradually morphed into something a tad more complex, so we’ll call it “A Comprehensive Overview of WordPress Site Owner Roles.”
For starters, here’s a list of the different roles you can expect to have when you start and maintain a WordPress (or any other) website and the most basic tasks each will deal with (click any role to be taken directly to its description):
TECHIE:performs the initial installation of the website
Each of the roles above has its own complexities and full blog posts (even books) have been written about each one. But, I will try to keep this simple and focus primarily on the main 3-5 tasks or objectives that you will need to perform in each role on a BASIC level.
(I will also provide a list of 5-6 additional tangential considerations for each role that may yet sprout off into supplementary blog posts for each.)
1. Techie
Performs the initial installation of the website.
The 3 major tasks a “techie” must deal with are:
Domain name registration
Website hosting
File transfers (FTP Clients)
When running WordPress, you have TWO options for how to host your site:
WordPress.com = hosted on the WordPress.comservice & most of the hosting issues are taken care of for you through the service
WordPress.org = a software download that you install yourself (or through a third-party hosting company) on a domain of your choice (and purchase)
WordPress.com
Hosting your site on WordPress.com is pretty self-explanatory. You sign up for a FREE blog and create a username that becomes your blog’s initial URL (unless you upgrade) at yourname.wordpress.com. Simply head over to their new blog creation page and follow the steps to get started.
WordPress.org
Downloading the software from WordPress.org and installing it on your own site (for example, yourname.com) is slightly more complicated, but not by much. You have two simple options to get started:
(What is a One-Click Install? Simply: you choose the software you want to install, click “Install”, select the destination, and the webhost’s installer performs all the default installation steps for you. The next thing you’d do is visit your site and log in to your newly installed website system.)
A Spattering of Web hosting Providers
While whole blog posts have been written to guide users through the choice of a plethora of web hosting providers, I’ll simply provide a list with my own experience below:
Dreamhost.com – affiliate (I’ve been a happy customer since 2009 – service keeps improving – hosting around $10/month)
Bluehost.com (My second choice – hosting for as low as $3.95/month)
Hostgator.com (Another highly recommended company, though I have no direct experience with them – honestly their branding and logo didn’t meet the same quality as the previous two, so I didn’t bother getting to know them better)
GoDaddy.com (Most famous for Domain name registrations as far as I know though they do provide hosting as well)
WPEngine.com (A proprietary WordPress hosting provider – you’ll pay a premium but also get premium service)
Domain Name Registration services I’ve used
Dreamhost.com –*affiliate (I just like having domain name registry and hosting all together)
Nameboy.com (This is a good place to go if you have TWO keywords that you want to blend together in different combinations – including hyphenated options)
Namecheap.com (This site provides the greatest number of secondary TLD recommendations if your primary choice is not available)
TLD = Top-Level Domains
The original Top-Level Domains (introduced in the 1980s) were .com, .org, .net, .edu, .gov, .mil, and .int. Countries also have their own TLDs including .uk, .au, .kr, among others. And in the 2000s, particularly from 2012 and onward, 1000s more TLDs have been created so that when I go to register a new domain in Dreamhost (*affiliate), I can find a page that looks something like this:
Each TLD has its own unique price, though the majority are between $10-50 for a one-year registration. (But check out the price of .rich in the above image!)
Best Advice for Choosing a Domain Name
Keep it Simple, Silly.
5 Top Domain Naming Tips
Simple, sweet, and easy to remember is best
Your domain name should tell or stand for what you do and be recognizable
Hyphens, dashes, and underscores are allowable but add complexity
Extra long names are hard to remember
If you want exclusivity (and so no one can piggy-back off your name with a different TLD), buy ALL the major TLDs with your name, i.e. nike.com, nike.net, nike.org, nike.info, etc.
Lastly, a techie will deal with the uploading, downloading, transferring, and modification of blog files (installation files, images, videos, podcasts, etc). This will likely be an ongoing process, so you may as well get familiar with it now. The following is a list of FTP (File-Transfer Protocol) clients that I’ve used and recommend:
FileZilla (my #1 recommendation because it is cross-platform and well-designed)
CyberDuck (an FTP client I’ve used extensively on MacOSX – now also available for Windows)
2. Admin
Sets and manages up the backend of the website.
The 3 major tasks an “admin” must deal with are:
Username + Password
Site setup
Site management
To start off with, good username and password choice goes a LONG way to ensuring the safety of your blog.
2 Top Tips (Username + Password):
Username: NEVER EVER EVER EVER pick “admin” as your username. This is the old default WordPress admin name, so everybody (hackers) and their dogs (hacker dogs) know it. This will be the FIRST thing someone tries if they want to hack your site.(Too late? Create a new “admin” account with a new username, then transfer all the posts and content over to the new username and delete your old “admin” account. Or find out how to change the “admin” account in the database tables – phpMyAdmin – here.)
Password: “K33P C4LM AND 5P34K L337”
(i.e. “Keep Calm and Speak Leet” – Leet (L337) is kind of a techie way to write using numbers and symbols in place of letters that look similar)
5 Top Password Creation Tips:
Use a combination of UPPERCASE, lowercase, numb345, &$ymb@!$
Create a pattern that’s easily recognizable or memorable for you (like this guy did)
Use a site-specific “pass phrase“ rather than password (like “aaron@mydigitalH0M3”)
Longer is always better – shoot for 10+ characters
Avoid dictionary / common words / expressions / strings of numbers
Once the username and password are setup and you’ve logged in to your WordPress site, here is a list of the TOP FIVE first things that I personally see to:
The following are a list of additional topics that an Admin may need to deal with and be familiar with. Each one is worth its own (extensive) Post (or book), so I will revisit them later:
Website Security
Website Backups
Plugins
Site Management
User Management
Discussion Management
Media Management
Advanced Topics
Updates & Site Tools
3. Designer
Takes care of the frontend of the website.
3 primary tasks a “designer” should address are:
The WordPress Theme Customizer (front page style editing)
Menu Creation
Widget Assignment
First Steps (in the “Appearance” Menu)
Customize – In the WordPress Customizer you can modify a variety of frontend design elements including:
Site Title
Tagline
Colors
Header Image
Background Image
Menus (Navigation)
Widgets
Static Front Page (this means you set your front page to a specific Page and your blog archive to a different Page)
Menus – Tip: to make dropdown menus, simply click-and-drag one menu item (in your “Menu Structure” window) underneath and to the right of a preceding (its “parent”) menu item
Widgets – Tip: if you’ve enabled some widgets and want to save their Settings for later, there’s a location at the bottom of the “Available Widgets” area (called “Inactive Widgets”) that you can click-and-drag those widgets you want saved into
Detours (Later Topics)
The following are a list of additional Design topics that may be of interest and will be revisited in later Posts:
Theme Choice
Custom CSS
Custom HTML in Posts
Basic Graphic Design
Color Theory
Typography
Layout
Branding
4. Content Creator
Is responsible for pushing NEW content to the website on a regular basis.
The 3 most important things a “content creator” must understand are:
WordPress Media
The Difference between Posts and Pages
The Difference between Tags and Categories
It’s long been a mantra of the web: CONTENT IS KING and today is no exception. If you aren’t regularly pushing NEW and useful content to the forefront of the supersaturated Inter-webs, you’re missing a valuable opportunity and a good percentage of the consumer population. People are always on the look out for the “newest” or “hottest” so as a Content Creator, you’d really do yourself (and your audience) a good service if you regularly deliver that which they seek.
My own personal process for Content Creation looks like this:
Plan (5-30 min)
Research (30 min-1 hr)
Write (1-2 hrs)
Edit (10-30 min)
Publish (1 min)
So, my own process for blogging may take anywhere between 1-4 hours. I tend to put a lot of emphasis on getting facts right, delivering useful information, and back-linking to the things I find, so that can end up taking up a good chunk of my time.
Embeds : WordPress is capable of automatically embedding certain kinds of media from various webpages including videos, PDFs, presentations, and tweets – all you need to do is copy-paste the URL of a given page into your Post editor and WordPress handles the rest. A (non-comprehensive) list of sites is below:
Uploads : Uploading your own media to WordPress is as simple as clicking and dragging the item from your Desktop directly into the Post editor. The Media Uploader automatically pops up and gives you more options. You are able to change the file upload size in your WordPress settings, but by default the max upload size is 10MB or so.
Featured Images : A Featured Image (formerly known as “Post thumbnails”) is similar to a cover image for an article. Different themes handle these differently, but this is THE image that will primarily be associated with your Post (if you assign one) on your site and through Social Media when the Post gets shared. To add a Featured Image, scroll to the bottom of the sidebar in the Post editor page to find an Image Upload meta-box called “Featured Image.”
The Difference between Posts and Pages
Posts : non-hierarchical articles that are referenced chronologically and can be categorized by Tags and Categories
Pages : hierarchical articles that can be assigned “Parents” (those Pages that would form the head of a dropdown menu) and can NOT be categorized by Tags and Categories
The Difference between Tags and Categories
Tags : non-hierarchical keywords used for Searching (like “green”, “big”, “important”, etc)
Categories : create a kind of folder structure that can be used to subdivide articles (like “WordPress”, “Classes”, etc) – these ARE hierarchical
Detours (Later Topics)
The following are a list of additional topics that Content Creators may find of interest and will be revisited in later Posts:
The 3 main things a “developer” is likely to deal with are:
Custom CSS code
Custom HTML code within Posts & Pages
Child Themes
As getting into the details of a Developer’s work is far more complex than this Post warrants, here’s a list of further topics to be discussed later in subsequent Posts:
Detours (Later Topics)
Learn:
HTML
CSS
JavaScript
jQuery
PHP
MySQL
Understand:
WordPress Codex
Plugin Development principles
Theme Development principles
How to make contributions to the WordPress core
WordPress development best practices
Join the Discussion
I hope you enjoyed (and got a lot out of) this overview of the various roles a WordPress site owner needs to understand. If there are any questions, comments, or suggestions to improve this Post or for later topics to be covered, please leave me a Comment in the section below. Thanks!~