This is the wordpress CMS/blogging platform.
make config
This will ask you to enter the domain name to use.
It automatically saves your responses into the configuration file
.env_{INSTANCE}
.
It will also ask you some questions to generate the WordPress config. Here is a guide to the answers you should pick depending on which kind of deployment you want:
-
Public Wordpress (default):
- Set
WP_TRAEFIK_HOST
to the domain name you want to use. - Say
N
to the question aboutHTTP Basic Authentication
. - Say
Y
orN
to enableanti-hotlinking of images
. - Allowing clients that send an empty referer is your choice.
- Say
N
to creating a static HTML wordpress export.
- Set
-
Private Wordpress (more secure; with optional public HTML snapshot):
- Set
WP_TRAEFIK_HOST
to the domain name you want to use. - Say
Y
to the question aboutHTTP Basic Authentication
. - Say
Y
orN
to enableanti-hotlinking of images
(applicable to both private and/or public static websites). - Say
N
orY
to creating a public static HTML wordpress export.
- Set
See AUTH.md for information on adding external authentication on top of your app.
make install
make status
make open
You must immediately configure the wordpress instance in your browser, setting the site title, and creating the admin account and password. Try to login (you might need to wait a minute). You should then be granted into the wordpress dashboard.
make destroy
will delete everything in the instancemake clean
will delete your configured .env and derived compose files.
To enable/disable hotlinking of uploaded images on other website
domains, answer the appropriate questions from make config
, or set
the following variables in the .env_{CONTEXT}
file:
WP_ANTI_HOTLINK=true
orWP_ANTI_HOTLINK=false
to turn on/off the anti-hotlinking middleware. (Applies to the/wp-content/upload
path only)WP_ANTI_HOTLINK_REFERERS_EXTRA
is a comma separated list of additional domain names to allow hotlinking from (whitelist).WP_ANTI_HOTLINK_ALLOW_EMPTY_REFERER=true
orWP_ANTI_HOTLINK_ALLOW_EMPTY_REFERER=false
to turn on/off the ability for clients that don't specify any referer to download the attachments (eg. RSS readers, curl, or copy/pasting the URL in the browser address bar).
This config includes the ability to generate a static HTML snapshot of
your wodpress site utilizing
wp2static, and hosting it
publicly with a static webserver (nginx). To enable the static
website, answer the appropriate questions from make config
, or set
the following variables in the .env_{CONTEXT}
file:
WP_WP2STATIC=true
orWP_WP2STATIC=false
- to enable/disable the static website.WP_WP2STATIC_VERSION=7.2
- The version of wp2static you want to use.WP_TRAEFIK_HOST_STATIC
- the domain name for the static website.WP_IP_SOURCERANGE_STATIC=0.0.0.0/0
- The IP whitelist for the static website.
Once deployed, go to the wordpress dashboard to change settings and enable the plugin:
- Go to the
Settings
page, clickPermalinks
, choose any one of thePermalink structure
options other thanPlain
. (The?
in the Plain option is incompatible with the wp2static crawler, so you must choose a different one.). ClickSave Changes
. - Go to
Plugins
page, find theWP2Static
plugin, and click onActivate
. - Go to the
WP2Static
settings page (top left). - Go to
Options
. - Set the
Basic Auth User
andBasic Auth Password
(Highly recommended, but this should only be set if you enabled HTTP Basic Auth duringmake config
. Otherwise you should clear this setting as your browser may have autofilled it with your wordpress account name/password. Note: this should be the same username and password saved inpasswords.json
, for the Traefik HTTP Basic Authentication, not necessarily the same as your wordpress account.). - Set the
Deployment URL
to the same asWP_TRAEFIK_HOST_STATIC
. - Click
Save Options
. - Go to
Run
. - Click
Generate static site
. - Click
Refresh Logs
several times until its finished.
Now you can open the URL to your static website
(WP_TRAEFIK_HOST_STATIC
), and you should see a static snapshot of
your wordpress site, the contents of which are stored in its own
volume: wp_wp2static
.