Installation

Installing WordPress software is pretty easy if you have Cpanel or similar hosting control software. Usually, just a couple of clicks and you have it. Cpanel is an expensive software for a non-professional blogger or website creator. It costs about $10 per month. Compared to shared hosting or virtual server which you can purchase way below $10 per month. Shared hosting usually has some kind of Cpanel. The problem comes when you buy (=rent) a virtual server or even a dedicated one. Then you have to make a decision: Buy Cpanel or install your software manually.

For those who want to install WordPress manually here are instructions.  You must have the domain installed on your server and the domain pointing to a certain directory. Let’s call this directory /home/sitemanager/how2os.com .  Open your domain with a browser (i.e. http://yourdomain.com). If you get an error you have something to fix before you can continue.

Here is the command of how to download and set WordPress in one shot. You run this in your domain root directory (i.e. /home/sitemanager/how2os.com) with user rights (not root user!). The user is the one who owns the directory. In this case, it is sitemanager.

wget https://wordpress.org/latest.tar.gz ; tar xzf latest.tar.gz ; yes | cp -a wordpress/* ./ ;rm -Rf wordpress ; rm latest.tar.gz

Then you must create the appropriate MySQL database. Do this as root or as a user who has the rights to do it.

Here are commands to create the database. Change databasename, user, and password. All these three are created during the database creation. They are not something you should know beforehand.

 mysql
 CREATE DATABASE databasename;
 use databasename;
 GRANT ALL PRIVILEGES ON databasename.* to "user"@"localhost" IDENTIFIED BY "password";
 FLUSH PRIVILEGES;
 quit

I made a script for myself to do it. You can easily do the same. The following two lines are just for those who have made the create-base.sh script. Otherwise use the instructions above.

cd /home/commonscripts/
 ./create-base.sh databasename

Next thing is to use a browser (Firefox, Chrome, …) and install the software:

http://yoursite.com/wp-admin/install.php

It will ask databasename, user, and password. Use the same names you used in the database creation.

The next things are just fine-tuning WordPress and installing plugins, themes, etc. From this point onwards you can do everything with the browser by logging in to WordPress  (http://yoursite.com/wp-admin). Following things are just my favorites and should be considered as examples. To perform these commands you have to install wp-cli into the server. Be careful when using these, especially if you have already done some configuration with the browser interface, published posts, etc.

Delete “Hello Dolly” and activate Akismet

 wp plugin delete hello
 wp plugin activate akismet

Install Jetpack. If you don’t have a Jetpack account create one if you want to use its features:

#Jetpack
 wp plugin install jetpack
 wp plugin activate jetpack

Log in to the WordPress installation with the browser and connect to your Jetpack account. Activate recommended features as well. You can also connect Akismet to your Jetpack account.

Activate and deactivate Jetpack modules:

# Jetpack modules
 wp jetpack module activate sitemaps
 wp jetpack module activate monitor
 wp jetpack module activate minileven
 wp jetpack module deactivate photon

My favorite plugins. Installing and activating them:

wp plugin install w3-total-cache --activate
wp plugin install broken-link-checker --activate
wp plugin install google-analytics-for-wordpress --activate
wp plugin install word-stats --activate
wp plugin install wordpress-seo --activate

Installing the Weaver theme and deleting default ones:

wp theme install weaver-xtreme
wp theme activate weaver-xtreme ; sleep 3
wp theme list
wp theme delete twentyfifteen twentyfourteen twentysixteen twentyseventeen twentyeighteen twentynineteen twentytwenty twentytwentyone

Instead of the Weaver, you can any other theme like AMP Accelerated Mobile Pages

wp theme install amp-Accelerated-Mobile-Pages
wp theme activate amp-accelerated-mobile-pages; sleep 3

Create the front page. It will open an editor for writing something to your front page.

wp post create --post_type=page --post_title="name-of-front-page" --edit --poststatus=published

Use the browser interface and publish the front page. Check also permalink settings.

Setting the front page:

wp post list --post_type=page
wp option update page_on_front 4
wp option update show_on_front page

Delete the example page and the post :

wp post delete 1
wp post delete 2

Create users: change username, user@emain, userpassword. Change the role if administrator rights are not what you want to give to the user:

wp user create username user@email --user_pass=userpassword --role=administrator --send-email