Blog Installation - eamonstackpole/my-tech-journal GitHub Wiki
Process
Set up LAMP (Linux, Apache, MySQL, PHP)
Linux
Apache
MySQL
- sudo yum install mariadb-server
- sudo systemctl start mariadb
- sudo systemctl enable mariadb.service (so it enables upon bootup)
- sudo mysql_secure_installation (default security settings)
-
- select "Y"(Yes) for everything except the database root password
- sudo mysql (to enter mySQL and make sure it works)
PHP
- sudo yum install
- sudo yum install php php-mysql
- sudo systemctl restart httpd.service
- NOTE: the PHP might be outdated for Wordpress, if so do the following:
- yum update
- yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm (Remi Repository for CENTOS7)
- yum-config-manager --enable remi-php81
- yum update
- php -v (to check the version of php)
-
- if it isn't 8.1, try installing php again
Set up Wordpress
Download and Config
Database and Account creation
- mysql -u root -p
- CREATE DATABASE wordpress;
- CREATE USER wordpressuser@localhost IDENTIFIED BY 'password';
- GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY 'password';
- FLUSH PRIVILEGES;
- exit
Wordpress Installation
- sudo yum install php-gd
- sudo service httpd restart
- wget http://wordpress.org/latest.tar.gz (grabs the most recent wordpress in a compressed file, also use this command in ~)
- tar xzvf latest.tar.gz (extracting with the tar tool)
- sudo rsync -avP ~/wordpress/ /var/www/html/ (copies the contents (wordpress) to the /var/www/html directory)
- mkdir /var/www/html/wp-content/uploads (so the website can store uploaded files)
- sudo chown -R apache:apache /var/www/html/* (allows the web server to create and modify wordpress files)
Wordpress Configuration
- cd /var/www/html
- cp wp-config-sample.php wp-config.php (copies the sample configs to the actual config file)
- nano / vi wp-config.php
- change the DB_NAME, DB_USER, and DB_PASSWORD variables to the previously chosen values
- save the file
Web Final Configs
- Go to the website
- create the site title, admin username, admin password, and associated email
- login using this at websiteURL.com/wp-admin
- the dashboard that appears allows you to configure the blog, creating new pages or customizing the theme
Notes
- websiteURL.com/wp-admin - How to access admin page (to edit)
Sources