Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# According to my tutorial, make sure you got a dedicated user for the website
adduser username
# Getting Wordpress
cd /home/username/public_html
wget https://wordpress.org/latest.tar.gz
tar -zxvf latest.tar.gz
rm latest.tar.gz
mv wordpress/* .
rm -R wordpress
chown -R www-data:username .
# Make your virtuahosts
nano /etc/apache2/sites-available/yourwebsite.com.conf
<VirtualHost *:80>
# Addresses
ServerName www.website.dom
ServerAlias website.dom
ServerAdmin admin@localhost
# Directory and rules
DocumentRoot /home/userdir/public_html
<Directory /home/userdir/public_html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
# Logging
# LogLevel settings : debug, info, notice, warn, error, crit, alert
LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/website-error.log
CustomLog ${APACHE_LOG_DIR}/website-access.log combined
</VirtualHost>
# Then enable your website
a2ensite yourwebsite.com.conf
service apache2 reload
# Then create your database using phpmyadmin and follow the install process.
# Enjoy ;)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.