From 711629fea816f02a6060489aa944d3ded68cc6b6 Mon Sep 17 00:00:00 2001 From: Blallo Date: Sat, 20 Jul 2024 00:23:59 +0200 Subject: [PATCH] add notes --- NOTES_ON_WORDPRESS.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 NOTES_ON_WORDPRESS.md diff --git a/NOTES_ON_WORDPRESS.md b/NOTES_ON_WORDPRESS.md new file mode 100644 index 0000000..33970f5 --- /dev/null +++ b/NOTES_ON_WORDPRESS.md @@ -0,0 +1,33 @@ +# Notes on exporting/importing wordpress + +Wordpress is an extremely tricky CMS to move. The local configuration assumes +the root url being at `http://localhost:8080`, but we want to publish the site +on a public, TLS protected address. + +In order to do so, many steps have to be taken. + +### Export the db + +The database has to be exported, and all occurrences of `http://localhost:8080` +have to be replaced with the public url, including the protocol. + +### Ensure that the wordpress installation knows its public url + +Using wordpress provided by docker, we need to set in the production container +environment the variable + +``` +WORDPRESS_CONFIG_EXTRA="define( 'WP_SITEURL', '' );" +``` + +### Configure the reverse proxy + +The reverse proxy where the TLS termination happens must pass the following +header to the wordpress container + +``` +X-Forwarded-Proto: https +``` + +otherwise all the assets are served through an unencrypted connection and the +browser (rightly so), refuses to load them.