Setting up Wordpress
2 minutes read •
Priliminary Setup
Set hostname
For example the put the following line as hostname.
Setup /etc/hosts
For example the put the following line as hosts.
Create New User
Add the user to sudo
Wordpress Setup
Install packages
-
You can also install
php-xmlrpcif you need. But it is best to not install this one. -
Check
apache2status.
Setup MariaDB
- Check
mariadbstatus.
- Securing mariadb.
For the unix_socket authentication we can answer no. That will enable standard authentication and will work just fine.
- Login as database root user.
- Create new user for
wordpress.
@'localhost' IDENTIFIED BY 'password';
- Create a database named
db.
;
- Check the created database.
SHOW DATABASES;
- Grant priviliges to the new user.
ALL PRIVILEGES ON wordpress_db.* TO 'wordpress'@'localhost';
- Flush and save changes.
FLUSH PRIVILEGES;
- Quit mariadb.
quit;
Download and Extract WordPress
Add a configuration file for WordPress to Apache
- Create new
.conffile for wordpress.
- Add the following lines in the
.conffile
DocumentRoot /var/www/wordpress
Options FollowSymLinks
AllowOverride All
DirectoryIndex index.php
Require all granted
Options FollowSymLinks
Require all granted
-
You can also set
AllowOverride Limit Options FileInfo. But that will create some problems when securing thewp-loginwith apachehtpasswd. -
Disable the default site and enable the new wordpress site.
- Enable some
apachemodules.
- Restart
apache2.
After all of that, access your site and then fill out form in the web browser. Then, you’re all set!