Skip to content

Instantly share code, notes, and snippets.

@edcote
Created April 10, 2018 01:42
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 edcote/6834471ea4c0dc5439b20a350a5e716b to your computer and use it in GitHub Desktop.
Save edcote/6834471ea4c0dc5439b20a350a5e716b to your computer and use it in GitHub Desktop.
WordPress

Getting Started

Assuming Ubuntu 17.10:

# install packages
sudo apt upgrade
sudo apt update
# mysql-server will ask for root password, set it
sudo apt install mysql-server
sudo apt install apache2
sudo apt install autoremove

# mysql config
sudo systemctl restart mysql.service
# check if mysql-server is running
sudo netstat -tap | grep mysql

# apache config
sudo systemctl restart apache2.service

WordPress Setup

Create your first wordpress application. Create and edit file: /etc/apache2/sites-available/wordpress.conf. Example:

        Alias /blog /usr/share/wordpress
        <Directory /usr/share/wordpress>
            Options FollowSymLinks
            AllowOverride Limit Options FileInfo
            DirectoryIndex index.php
            Order allow,deny
            Allow from all
        </Directory>
        <Directory /usr/share/wordpress/wp-content>
            Options FollowSymLinks
            Order allow,deny
            Allow from all
        </Directory>

Then:

  • Enable site: sudo a2ensite blog
  • Restart apache: sudo systemctl reload apache2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment