Making And Maturing Disciples of Jesus Christ For The Glory Of God.
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
servers [2019/10/07 09:23] johngoossen created |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Servers ====== | ||
- | ===== Setup WordPress ===== | ||
- | |||
- | Note: The following styles are used in this guide: | ||
- | <WRAP cli> | ||
- | this typeface indicates a command to be entered in the terminal | ||
- | </ | ||
- | |||
- | A \ indicates that a command continues on the next line. The following two commands are equivalents: | ||
- | |||
- | <WRAP cli> | ||
- | sudo apt update && sudo apt upgrade | ||
- | </ | ||
- | |||
- | <WRAP cli> | ||
- | sudo apt update && \ | ||
- | sudo apt upgrade | ||
- | </ | ||
- | |||
- | <file This is the name of a file to be edited> | ||
- | and this is the contents of the file | ||
- | ⋮ ← indicates sections of file not shown | ||
- | </ | ||
- | |||
- | ==== 1. Create a database for the WordPress site. ==== | ||
- | |||
- | The first step we will take is to create a database that WordPress will use to store and maintain it’s data. | ||
- | At a terminal on the server issue the following command to launch the database management terminal with privileged access: | ||
- | |||
- | sudo mariadb | ||
- | |||
- | Note: MariaDB is a drop in replacement for MySQL. For this guide MariaDB and MySQL can be used interchangeably. | ||
- | |||
- | To create the database use the following command: | ||
- | |||
- | CREATE DATABASE wp_rick DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
- | |||
- | Note: SQL commands end with a ; | ||
- | |||
- | Next create a MariaDB user that will be used exclusively by WordPress. Use the following command: | ||
- | |||
- | GRANT ALL ON wp_rick.* TO ' | ||
- | |||
- | Now you have a database and user for WordPress’ exclusive use. The following command will reload the grant tables so the MariaDB knows about the changes. | ||
- | |||
- | FLUSH PRIVILEGES; | ||
- | |||
- | Exit out of MariaDB by typing: | ||
- | |||
- | EXIT; | ||
- | ==== 2. Download and Pre-Configure WordPress ==== | ||
- | |||
- | Download WordPress using wget from your home directory on the server. | ||
- | |||
- | wget https:// | ||
- | |||
- | Extract the compressed file to create the WordPress directory structure: | ||
- | |||
- | tar xzvf latest.tar.gz | ||
- | |||
- | On your own computer, use filezilla to copy wp-config-sample.php to your local computer. | ||
- | Host: bethelministries.co | ||
- | Username: rick | ||
- | Password: YourSuperSecretPassword | ||
- | |||
- | |||
- | On your computer rename wp-config-sample.php to wp-config.php. | ||
- | |||
- | Open wp-config.php for editing. | ||
- | Modify the database connection settings. You need to adjust the database name, the database user, and the associated password that you’ve configured within MariaDB. | ||
- | |||
- | wp-config.php (Partial File – Database section) | ||
- | ⋮ | ||
- | |||
- | define(' | ||
- | |||
- | /** MySQL database username */ | ||
- | define(' | ||
- | |||
- | /** MySQL database password */ | ||
- | define(' | ||
- | |||
- | ⋮ | ||
- | |||
- | Use your browser on your computer to navigate to https:// | ||
- | |||
- | copy the results into wp-config.php, | ||
- | |||
- | wp-config.php (Partial section BEFORE edit) | ||
- | ⋮ | ||
- | /**#@+ | ||
- | * Authentication Unique Keys and Salts. | ||
- | * | ||
- | * Change these to different unique phrases! | ||
- | * You can generate these using the {@link https:// | ||
- | * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again. | ||
- | * | ||
- | * @since 2.6.0 | ||
- | */ | ||
- | define( ' | ||
- | define( ' | ||
- | define( ' | ||
- | define( ' | ||
- | define( ' | ||
- | define( ' | ||
- | define( ' | ||
- | define( ' | ||
- | |||
- | /**#@-*/ | ||
- | ⋮ | ||
- | |||
- | wp-config.php (Partial section AFTER edit) | ||
- | ⋮ | ||
- | /**#@+ | ||
- | * Authentication Unique Keys and Salts. | ||
- | * | ||
- | * Change these to different unique phrases! | ||
- | * You can generate these using the {@link https:// | ||
- | * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again. | ||
- | * | ||
- | * @since 2.6.0 | ||
- | */ | ||
- | define(' | ||
- | define(' | ||
- | define(' | ||
- | define(' | ||
- | define(' | ||
- | define(' | ||
- | define(' | ||
- | define(' | ||
- | /**#@-*/ | ||
- | ⋮ | ||
- | |||
- | Save and close the file when you are finished. | ||
- | |||
- | Copy the file from your computer back onto the server with Filezilla. | ||
- | 3. Prepare the virtualhost document root Directory | ||
- | Back at the server, copy the entire pre-configured wordpress folder from your home directory on the server to your virtualhost document root. The source includes a dot at the end to indicate that everything in the directory should be copied, including hidden files. | ||
- | |||
- | sudo cp -a ./ | ||
- | |||
- | Now that WordPress is located in it’s final location we need to set the ownership and permissions for the files and folders. | ||
- | |||
- | Apache2 runs as www-data, so set the ownership to that user and group. This allows Apache2 to serve the files and update them when it needs to. | ||
- | |||
- | sudo chown -R www-data: | ||
- | |||
- | Change the permissions of the files and folders under / | ||
- | We can use find to create a list of files or folders and chmod to apply the permissions. | ||
- | |||
- | sudo find / | ||
- | sudo find / | ||
- | ==== 4. Complete the Installation Through the Web Interface ==== | ||
- | |||
- | Finally, you can finish installing and configuring WordPress by accessing it through the web interface. | ||
- | |||
- | In your web browser, navigate to your server’s domain name or public IP address: | ||
- | |||
- | http:// | ||
- | |||
- | Select the language you would like to use: | ||
- | Next, you will come to the main setup page. Select a name for your WordPress site and choose a username and password. A strong password is generated automatically. Save this password or select an alternative strong password. | ||
- | |||
- | Enter your email address and select whether you want to discourage search engines from indexing your site: | ||
- | When ready, click the Install WordPress button. You’ll be taken to a page that prompts you to log in: | ||
- | Once you log in, you will be taken to the WordPress administration dashboard: | ||
- | From the dashboard, you can begin making changes to your site’s theme and publishing content. | ||
- | ==== Conclusion ==== | ||
- | |||
- | WordPress is now installed and ready to use. Some things you might want to consider: | ||
- | • Go over the settings and verify they are set to what you want. | ||
- | ◦ In Discussion, you might want to specify that a user must be registered and logged in in order to comment. | ||
- | ◦ Under Reading you can set what to show on the home page. | ||
- | ◦ Configure Permalinks (the persistent path part of the url). | ||
- | ◦ Setup a privacy page explaining your privacy policies. | ||
- | • Change the Appearance with themes | ||
- | • Install plugins (such as WPGiftRegistry and All-in-One WP Migration) | ||
- | • Check out the First Steps with WordPress guide: | ||
- | (https:// |