In this lecture will install WordPress. WordPress is by far the most popular blogging and content management 1
system on the Web. According to some statistics, it powers more than one third of the websites. 2
It's robust for creating and managing your business or personal websites, blogs or e-commerce 3
stores alike. WordPress is a free and open source content management system, or CMS for short, written 4
them in PHP and paired with a MySQL or MariaDB database 5
It has lots of features, including a plugin architecture and the template system referred to within 6
WordPress 7
as themes. Let's get started and install WordPress on our VPs. 8
We have a running Ubuntu server with a bind DNS server that hosts the domain crystalmind. 9
academy. The Apache Web server is running and is paired with PHP configured with OpenSSL and 10
the digital certificate for encryption. 11
MySQL is running as well. 12
The first step is to create a MySQL database, to store all the data like posts, pages, users, 13
plugins or settings. I'm logging into my SQL Server by running as root: mysgl-u 14
root 15
I'm on the server 16
and I’ll run an SQL statement in the MySQL shell to create the database: 17
So CREATE DATABASE 18
and the name of the database, WordPress and a semicolon at the end. Every Sql statement ends with a semicolon. 19
Note that you can run only sql statements within the MySQL Shell. 20
Next, I'll create a new MySQL account that has all the access to the database. 21
So CREATE USER the user between single quotes, wordpressuser @and the name or the IP of the server 22
localhost, between single quotes as well IDENTIFIEDBY 23
and the password localhost pass123 and dot ( change it with a very strong password). 24
And don't forget the semicolon at the end. 25
And I'm providing the user with all privileges on the WordPress database, so GRANT ALL PRIVILEGES 26
On and the name of the database wordpress. and an asterisk; the asterisk means all tables of the 27
database TO the name of the user wordpressuser 28
@localhost the location of the MySQL server. 29
Once I have set the permissions for this new WordPress user, I'll reload all the privileges, so FLUSH 30
PRIVILEGIES 31
And I'm exiting the MySQL Shell. The next step is to download the latest version of WordPress from 32
the official website. 33
I'm moving to /tmp to have write access and I'm running wget https: // wordpress 34
.org 35
/latest. 36
.tar.gz 37
This command will download the latest version of WordPress. 38
And I'm extracting the archive:tar-xzvf and the name of the archive and I'mmoving 39
its contents to the domain document root directory where the website will reside. 40
This is the directory /var/www/ 41
crystalmind.academy 42
I'm removing these two files before copying wordpress there. 43
In moving the WordPress files to that directly mv /tmp/wordpress/* and the destination directory. 44
I'm also changing the ownership of the files to belong to the same user group under which the Web server 45
runs. 46
Apache runs as www -data, and I'm changing the ownership of the WordPress files accordingly: 47
chown -R, the name of the owner, the name of the group and the directory. 48
Now that everything is set up, it's time to finalize the WordPress installation using its Web interface. 49
With the browser, I'm accessing the website on the crystal Mind.academy domain and the set up 50
page is loading, I'm selecting the language and clicking continue. On this screen 51
the setup wizard is reminding us that it needs the database details. 52
I'm clicking 53
"Let's go" On this window 54
I'll enter the database name, user and password created at the beginning of this lecture. 55
I'm clicking submit. 56
And I'm starting the installation; finally. in this ste, 57
I'll enter a title for the website and choose a user 58
and a password used to administer the website. 59
The instoller has automatically generated a strong password and I'll use it. Take care to save it in 60
your password manager because you'll need it. 61
And I'm installing WordPress. 62
If there are no errors, I'll log into the administration section of the website. 63
I'm logging in. 64
This is the WordPress administration dashboard, and you can start writing your first blog, creating 65
a page or installing plugins and themes. 66
Bookmark this address so that you can revisit this page easily. Just to test it 67
I'm creating a very simple blog post:Posts Add new 68
So I'm entering a title. 69
And I'm writing something. 70
And I'm publishing the page. 71
I'm accessing the website in another tab, and this is my first blog post. 72
That's all. WordPress is a really big application, and keeping it secure is important. In the next lecture 73
I'll show you some tips to keep it secure. 74
See you in two seconds!