Installing WordPress

From Sympl Wiki
Jump to navigation Jump to search
This article is Beta Documentation. It may have missing elements, or be unclear in places.
Please feel free to make corrections or amendments, or ask for help on the Sympl Forum

WordPress is an extremely popular open source content management system. It's ease of use combined with a huge number of plugins and themes mean it is used by more than 60 million websites, including 1/3 of the top 10 million sites.

This guide is aimed at the novice user, but will result in a self-updating WordPress install, supporting the vast majority of themes and plugins with minimal security concerns. If you run into any issues, please post on the Sympl Forum and we should be able to help.

You will need

  1. A server running Sympl
    • A basic server with 1GB of RAM, 1 core and 10GB or more of disk space should suffice for moth sites.
    • If you already have a server running Sympl, you can use that.
  2. Basic familiarity with SSH
    • This can be done via the VGA/VNC console, but it's easier to copy and paste over SSH.
    • MacOS and Linux have built-in SSH clients. PuTTY is a popular SSH Client on Windows
  3. A domain name to host the site on
    • You can use any domain you have access to, but will need to point DNS records to the server for it to be publicly visible.
    • If you're testing, you can edit your hosts file to test before updating the DNS.

Installing WordPress

In the guide below, we'll be setting up the site 'example.com', using a database called wpexample. Simply substitute domain name and database name for something that makes sense to you.

  1. Log into your server as the sympl user.
  2. If you haven't already done so, create the new site with sympl create web example.com. Remember that you don't need to add the 'www.' on the start of the domain.
    • If you already have a site set up, then you'll need to move/disable the old site with sympl disable web example.com
  3. Download WordPress and unpack it:
    1. cd /srv/example.com/public/ - change directory to the public directory for the domain.
    2. wget -O - https://wordpress.org/latest.tar.gz | tar -zxv - download the latest WordPress version, and extract it.
    3. mv -Tvn wordpress htdocs - rename the extracted wordpress directory to htdocs
    4. sudo sympl-filesystem-security - reset permissions on the downloaded files.
  4. Create the database for WordPress with sympl create database wpexample. This will create a database called wpexample with a matching user. Make a note of the password.
  5. Open the website in a browser, and run through the setup wizard. If you don't have DNS pointing to the server yet, remember to edit your hosts file so you can access the site.
    • Select your language, click 'Continue', then 'Let's Go!'.
    • Database name: wpexample
    • Username: wpexample
    • Password: Use the password provided in step 4. If you lost it, you can run cat /home/sympl/mysql_wpexample_password to output it.
    • Database Host: localhost
    • Table Prefix: wp_
    • Click Submit, then Run the Install.
  6. Fill in the administrator details. These can be updated or changed later, but make sure the email address is correct.

You can now customise or update WordPress as desired!

Things to know

WordPress will automatically update itself with security updates but won't update plugins or themes. You should keep an eye on the WordPress Dashboard for any pending updates, or install a plugin to monitor or update them automatically.

If the site is newly created, then Sympl will automatically retrieve an SSL certificate once DNS is pointing to it. You can force this with sudo sympl-ssl --verbose example.com. Once you have an SSL certificate and the site is visible on https://example.com, you can update the site address via the "General Settings" page in the WordPress Dashboard, by changing the "WordPress Address (URL)" and "Site Address (URL)" fields.