Skip to content

Instantly share code, notes, and snippets.

@UltimateByte
Last active August 20, 2016 01:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save UltimateByte/1d9f1afc9adcad7eff5ff16789d88d62 to your computer and use it in GitHub Desktop.
Save UltimateByte/1d9f1afc9adcad7eff5ff16789d88d62 to your computer and use it in GitHub Desktop.
# 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