Installing WordPress: Difference between revisions

From Sympl Wiki
Jump to navigation Jump to search
No edit summary
Tag: visualeditor
No edit summary
Tag: visualeditor
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Beta Documentation}}
[https://wordpress.org/ 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.
[https://wordpress.org/ 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.
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 [https://forum.sympl.host Sympl Forum] and we should be able to help.


===You will need===
===You will need===
Line 8: Line 10:
#*A basic server with 1GB of RAM, 1 core and 10GB or more of disk space should suffice for moth sites.
#*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.
#*If you already have a server running Sympl, you can use that.
#'''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
#'''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|edit your hosts file]] to test before updating the DNS.
===Installing WordPress===
In the guide below, we'll be setting up the site '<code>'''''example.com'''''</code>', using a database called <code>'''''wpexample'''''</code>. Simply substitute domain name and database name for something that makes sense to you.


# '''Basic familiarity with SSH'''
#Log into your server as the <code>sympl</code> user.
#If you haven't already done so, create the new site with <code>sympl create web '''''example.com'''''</code>. Remember that you don't need to add the '<code>www.</code>' 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 <code>sympl disable web '''''example.com'''''</code>
#Download WordPress and unpack it:
##<code>cd /srv/'''''example.com'''''/public/</code> - change directory to the public directory for the domain.
##<code>wget -O - <nowiki>https://wordpress.org/latest.tar.gz</nowiki> | tar -zxv</code> - download the latest WordPress version, and extract it.
##<code>mv -Tvn wordpress htdocs</code> - rename the extracted <code>wordpress</code> directory to <code>htdocs</code>
##<code>sudo sympl-filesystem-security</code> - reset permissions on the downloaded files.
#Create the database for WordPress with <code>sympl create database '''''wpexample'''''</code>. This will create a database called '''''<code>wpexample</code>''''' with a matching user. Make a note of the password.
#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|edit your hosts file]] so you can access the site.
#*Select your language, click 'Continue', then 'Let's Go!'.
#*Database name: <code>'''''wpexample'''''</code>
#*Username: <code>'''''wpexample'''''</code>
#*Password: Use the password provided in step 4. If you lost it, you can run <code>cat /home/sympl/mysql_'''''wpexample'''''_password</code> to output it.
#*Database Host: <code>localhost</code>
#*Table Prefix: <code>wp_</code>
#*Click Submit, then Run the Install.
#Fill in the administrator details. These can be updated or changed later, but make sure the email address is correct.


*** This can be done via the VGA/VNC console, but it's easier to copy and paste over SSH.
You can now customise or update WordPress as desired!
*** MacOS and Linux have built-in SSH clients. PuTTY is a popular SSH Client on Windows


# '''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|edit your hosts file]] to test before updating the DNS.
===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 <code>sudo sympl-ssl --verbose '''''example.com'''''</code>''.'' Once you have an SSL certificate and the site is visible on <code>https://example.com</code>, 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.
<br />
[[Category:How To]]
[[Category:How To]]

Revision as of 13:22, 2 January 2020

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.