WordPress
Introduction
WordPress is a content management system (CMS) that is functions primarily serve our homepage to users that would like to get help or discover more about the program. It's a very powerful platform that grants administrators creative freedom over whatever they want on their website.
Installation
The installation for WordPress is really simple. All you have to do is download the compressed file for the installation and extract it in the directory that you'd want to install it to. You can either download it from their website here or alternatively you can download it using wget
. The command would be sudo wget https://wordpress.org/latest.tar.gz
on UNIX systems (if you're using aptitude for your package manager.) Once you've downloaded the file, run sudo tar -xzvf latest.tar.gz
to extract it.
.
Once you've downloaded and extracted the file, visit your web server to continue with the installation process. From here you must create a Database for WordPress, we use MySQL the instructions for creating a database within MySQL goes as follows.
Accessing MySQL
First of all log onto your webserver. (Logan is 24PinTech's webserver)
Once in the webserver and you have access to the command line use this command to go into the MySQL command prompt mysql -u <admin username> -p
then type in the password associated with your admin user. Upon success you should see a prompt that looks like such:
Welcome to MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5340 to server version: 3.23.54 . Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
Run the following commands to create the database, CREATE DATABASE <database name>;
then, GRANT ALL PRIVLEGES ON <database name>.* TO "<wordpress username>"@"<host name>"
Replace wordpress username and host name with the desired names. Do the same when it asks for a password.
To finish the creation of the database run these two commands FLUSH PRIVILEGES;
and EXIT;
then the MySQL monitor will personally say bye to you.
Setting up the wp-config.php file
You can either create and edit the wp-config.php
file yourself, or you can skip this step and let WordPress try to do this itself when you run the installation script. (not recommended)
Follow these instructions if you wish to edit the file manually. Navigate to your domain's home directory then copy the wp-config-sample.php
file and rename the copy to wp-config.php
You can do this using the cp
command within Linux, or running sudo cp wp-config-sample.php wp-config.php
in your domain's home directory. Edit it using sudo vim wp-config.php
press i
to enter insert mode and change the following values.
DB_NAME use the name of your database
DB_USER use the username of your database
DB_PASSWORD use the password of your database
DB_HOST use the hostname you determined for your database, whish is usually
localhost
Then you must enter your secret key values. (good luck) To get your secret key values visit this website here then go down to where the website matches the file. Enter your 8 unique keys by hand, make sure each character matches exactly, and you use the correct key for the correct slot. ie. AUTH_KEY
goes with AUTH_KEY
etc.
SAVE SAVE SAVE PLEASE, you should also save while you are editing the file periodically. Save by pressing esc
then typing :w
and exit by pressing esc
and typing :q
, alternatively you can save and exit by pressing esc
and typing :wq
.
Finishing Up
You might have to move all of your WordPress files out of the WordPress directory into your domain's home directory. Do this with the mv
command ie. sudo mv wp-config.php /var/www/example.ms
.
Visit your webpage to finish the WordPress installation and to make a WordPress account.
Links For Extra Explanations
Creating a Database for WordPress
Management
WordPress was created with the user's experience in mind. The dashboard is very intuitive, and the community is large enough to have answers to most questions/problems. In order to manage a WordPress powered website, you need to use the admin dashboard. In order to get to it, go to the WordPress installation's root directory and then navigate to the /wp-admin
directory (i.e. website.com/wp-admin). From there, you can edit posts, the theme, pages, plugins, and more. If you don't know how to do something, Google it! The WordPress community has been around since 2003, so your question has most likely been asked and answered before.
Logging In
In order to log into WordPress, go to website.com/wp-admin (replace website.com with your domain).
Creating Accounts
If you need to create an account, go to Users → Add New from the WordPress dashboard. From there, fill out all of the information for the new account and press the Add New User button.
If you need to edit any of the users (change username, reset password, etc), navigate to Users → All Users and click on the one that you need to modify.
Adding Menu Items
Before you can add an item to your primary menu, you need to have a new (or preexisting) page. If you need to create one, go to Pages → Add New and create it. Once it's created, navigate to Appearance → Menus and draw your attention to the Add Menu Items section. Find your new page in the list and click on the checkbox and click Add To Menu.
Editing Page Contents
To edit page content you want to first open the page you want to edit. To do this from Dashboard you want to go to Pages then click on the page you want then you click the blue button that says Edit with Elementor or from the pages section you can hover over the page you want to edit then some options will appear below of which you want to select Edit with Elementor. From there you can edit stuff already on the page, add more content or get rid of content.
Adding/Modifying Themes
To add/modify themes you want to go to Appearance then you can select Themes to choose a theme or customize the one you already have selected. You can choose Customize to go directly to modifying the theme you already have selected. You can select Widgets to edit the widgets on different parts of your website like the header, sidebars and footer. You can select Menus and edit the menus. You can select Header to go instantly to editing the header. You can go to Background to edit the background.
Uploading Images
To upload an image you can select the Media section from the Dashboard. From there you can view images you already have uploaded and you can select Add New to add a new image. You can also add new images if you are already editing a page. To do this just drag the image widget to where you want it then you can choose image and insert an image that is already uploaded or upload a new image.
Troubleshooting
If after an installation you get prompted for FTP credentials, add the following line to the wp-config.php file in the directory that WordPress was installed
define(“FS_METHOD”, “direct”);