Merge pull request #146 from deb-intel/wpinstall-edits2

Edits to wp-install.rst
This commit is contained in:
mltullis
2018-05-22 17:55:42 -07:00
committed by GitHub
@@ -1,207 +1,160 @@
.. _wp-install:
Create a Clear Linux WordPress\* server
Create a Clear Linux WordPress server
#######################################
Prerequisites
=============
This tutorial shows you how to install the WordPress components on your |CL| LAMP server. At the end of :ref:`web-server-install`, you created a WordPress\*-ready database using phpMyAdmin\* and MariaDB\*. Now that the LAMP server is up and running, you can add the WordPress components needed to host a WordPress website on your system.
This tutorial assumes you have already
:ref:`installed Clear Linux on a bare metal system <bare-metal-install>`
and that you have :ref:`set up a LAMP web server <web-server-install>`.
Before you begin
=================
Additionally, all the steps on this tutorial were tested using a NUC6i5SYH
Intel® NUC. Visit the `NUC6i5SYH product page`_ for detailed information.
This tutorial assumes you have successfully installed :ref:`Clear Linux on bare metal<bare-metal-install>` and that you have :ref:`set up a LAMP web server <web-server-install>`.
Before installing any new packages, update the |CL| OS with the
console command:
.. code-block:: console
Before you install new packages, update the |CL| OS with the following command:
.. code-block:: bash
sudo swupd update
Creating a WordPress server
Create a WordPress server
===========================
This tutorial walks you through the process of installing the WordPress
components on your |CL| LAMP server. At the end of the
:ref:`web server tutorial <web-server-install>`, we created the initial
WordPress MySQL database `WordPress` using phpMyAdmin\* and MariaDB\*.
With the LAMP server up and running, we can add the WordPress components
needed to host a WordPress website on your host system.
WordPress can be installed in a variety of ways. These instructions are written for users who have followed our instructions for installing phpMyAdmin when they :ref:`set up a LAMP web server <web-server-install>`. Note that all steps in this tutorial have been tested using a NUC6i5SYH Intel® NUC. Visit the `NUC6i5SYH product page`_ for detailed information.
Throughout this tutorial we will reference your website name as
<your_website>. There are numerous articles available on-line regarding how
to name your website and acquire the necessary certificates. Those tasks are
beyond the scope of this tutorial.
Numerous online articles are available to help you name your website and acquire the necessary certificates. Those tasks are beyond the scope of this tutorial.
There are also several actions you can take to harden your website from
attacks. The security of your website and the data it contains are complex
and ever-evolving tasks. They should be at the top of your to do list if you
plan to expose your website to the outside world. This tutorial does not
address security measures that you can take to harden your site but we
strongly encourage you to look into it.
Installing WordPress
--------------------
The folks at WordPress have created a `step-by-step guide`_ to install
WordPress quickly and easily. We are following this procedure very closely.
We are setting up a WordPress blog which can be accessed at:
http://<your_website>/blog
To accomplish this setup, we must put the WordPress components in the
:file:`/var/www/html/blog` directory.
Let us get started:
1. To move to the top-level of the websites root directory, enter the
following command:
.. code-block:: console
cd /var/www/html
2. To download the latest version of WordPress, enter the following command:
.. code-block:: console
sudo curl -O https://wordpress.org/latest.tar.gz
3. To extract all the files and directories from the downloaded file,
enter the following command:
.. code-block:: console
sudo tar xzvf latest.tar.gz
4. To rename the top-level WordPress directory to “blog”, enter the following
command:
.. code-block:: console
sudo mv wordpress blog
5. To remove the downloaded tar file, enter the following command:
.. code-block:: console
sudo rm latest.tar.gz
Setting up WordPress
--------------------
With the WordPress components loaded into the
:file:`/var/www/html/blog` directory, we can set everything up.
Instead of editing the :file:`wp_config.php` file manually, we are using the
web-based configuration tool to setup the database name and user. We created
both in the :ref:`web server tutorial <web-server-install>`. In your browser,
go to: http://<your_website>/blog/wp-admin/install.php.
Your screen should look like figure 1:
.. _fig-wp-install-1:
.. figure:: figures/wp-install-1.png
:alt: WordPress language selection
:width: 600
WordPress language selection screen.
Select :guilabel:`English` for the language and click the
:guilabel:`Continue` button. :ref:`As shown on figure 1<fig-wp-install-1>`
The WordPress installation continues until the welcome screen shown in figure
2 appears:
.. figure:: figures/wp-install-2.png
:alt: WordPress welcome screen
:width: 600
WordPress welcome screen.
Click the :guilabel:`Lets go!` button to enter the information.
Enter the database name, username, and password we used when creating the
database:
Database name: WordPress
Database username: wordpressuser
Database password: wp-example
Enter the following values for the database host and the table prefix:
Database host: localhost
Table prefix: wp\_
Figure 3 shows the filled out fields.
.. figure:: figures/wp-install-3.png
:alt: Database connection details
:width: 600
These details are needed for WordPress to connect to the database.
You can take several actions to harden your website from attacks. The security of your website and the data it contains are complex and ever-evolving tasks. Prioritize security if you plan to expose your website to the outside world. This tutorial does not address security measures that you can take to harden your site but we strongly encourage you to take action.
.. note::
When you enter your password into the password field, it will be in clear
text and not asterisks.
Throughout this tutorial, we reference your website name as <your_website>.
After entering all the data for accessing your database, click the
:guilabel:`Submit` button.
Figure 4 shows the following screen letting you know the communication
between WordPress and your database has been successfully set up.
Download WordPress and manage directories
------------------------------------------
.. figure:: figures/wp-install-4.png
For this tutorial, you will create a WordPress blog that can be accessed at: http://<your_website>/blog.
To accomplish this setup, you must add WordPress components to the :file:`/var/www/html/blog` directory.
Follow these steps:
#. Navigate to the top level of the websites root directory:
.. code-block:: bash
cd /var/www/html
#. Download the latest version of WordPress:
.. code-block:: bash
sudo curl -O https://wordpress.org/latest.tar.gz
#. Extract all files and directories from the downloaded file:
.. code-block:: bash
sudo tar xzvf latest.tar.gz
#. Rename the top-level WordPress directory to “blog”:
.. code-block:: bash
sudo mv wordpress blog
#. Remove the downloaded tar file:
.. code-block:: bash
sudo rm latest.tar.gz
Set up WordPress with Web-based GUI
-----------------------------------
Recall that you created a database and user when you installed phpMyAdmin during :ref:`Creating a Clear Linux based web server <web-server-install>`. Next, you must connect WordPress to the database and install WordPress.
To continue with the setup, go to: http://<your_website>/blog/wp-admin/install.php. The WordPress language option screen appears, as shown in figure 1.
#. Select :guilabel:`English` and click :guilabel:`Continue`.
.. figure:: figures/wp-install-1.png
:alt: WordPress language selection
:width: 600
`Figure 1: WordPress language selection screen.`
The WordPress installation continues until the Welcome screen appears, as shown in figure 2:
.. figure:: figures/wp-install-2.png
:alt: WordPress welcome screen
:width: 600
`Figure 2: WordPress Welcome screen.`
#. Click :guilabel:`Lets go!`.
#. Enter database connection specifics in the screen that appears as shown in Figure 3 below.
* Database name: WordPress
* Database username: wordpressuser
* Database password: wp-example (asterisks will not appear in the text box)
* Database host: localhost
* Table prefix: wp\_
Figure 3 shows the completed fields:
.. figure:: figures/wp-install-3.png
:alt: Database connection details
:width: 600
`Figure 3: Information necessary for WordPress to connect to the database.`
#. Click :guilabel:`Submit` to complete the setup.
Figure 4 shows the confirmation screen that verifies a successful setup. WordPress is connected to the MariaDB database.
.. figure:: figures/wp-install-4.png
:alt: Successful database connection.
:width: 600
This screen shows WordPress was able to connect to the MySQL database.
`Figure 4: Successful WordPress connection.`
Click the :guilabel:`Run the install` button.
#. Click :guilabel:`Run the install`.
The installer runs until WordPress is fully installed on your system.
Let the installer run until WordPress is fully installed on your system.
Complete successful login
---------------------------
Once the installation is completed, you can name your blog and create a
Wordpress username and password, see figure 5.
Once the installation is complete, you can name your blog and create a Wordpress username and password. See figure 5.
.. figure:: figures/wp-install-5.png
:alt: WordPress user creation
:width: 600
Provide WordPress the needed information to create a site and a user
with the permissions to change it.
`Figure 5: WordPress site information screen.`
.. tip::
You can copy the password to log in faster.
#. Enter all required information.
#. Click :guilabel:`Install WordPress`.
#. Verify that the initial login screen appears once the installation is complete. See figure 6:
Enter all the required information and click the
:guilabel:`Install WordPress` button.
Once the installation is complete, the initial login screen appears, see
figure 6:
.. figure:: figures/wp-install-6.png
.. figure:: figures/wp-install-6.png
:alt: WordPress login
:width: 600
The WordPress login screen.
`Figure 6: The WordPress login screen.`
Enter your WordPress username and password.
Check the :guilabel:`Remember me` checkbox, to save your credentials.
Click :guilabel:`Log in`.
#. Enter your WordPress username and password.
#. Check :guilabel:`Remember me`to save your credentials.
#. Click :guilabel:`Log in`.
Figure 7 shows the WordPress dashboard after a successful login:
@@ -209,7 +162,7 @@ Figure 7 shows the WordPress dashboard after a successful login:
:alt: WordPress Dashboard
:width: 600
The WordPress dashboard appears after you log in successfully.
`Figure 7: The WordPress dashboard.`
You are ready to go!
@@ -220,7 +173,7 @@ http://<your_website>/blog on your browser. Figure 8 shows the result:
:alt: WordPress blog
:width: 600
The final result is the fully realized WordPress blog.
`Figure 8: Your WordPress blog.`
**Congratulations, your WordPress blog is up and running!**