WordPress Selfhost

If you ever want to host your own WordPress instance, use a x86 based server… not an ARM based server… it will save you alot of pain

WordPress ssl

If you are like me and you dont like to have a warning everytime someone enters your site, get ssl! i did it with Apache2 and certbot.

Now the site usually doesnt work at that point bc theres alot of http hardcoded… it took me a bit but i got the solution:

# run in wp-includes
sudo find . -maxdepth 1 -type f $(printf "! -wholename ./%s " $(cat ignore-files.txt)) -exec sed -i 's/http/https/g' {} +
sudo find . -maxdepth 1 -type f $(printf "! -wholename ./%s " $(cat ignore-files.txt)) -exec sed -i 's/httpss/https/g' {} +

sudo find . -type f -exec sed -i 's/get_https_origin/get_http_origin/g' {} +
sudo find . -type f -exec sed -i 's/wp_https_validate_url/wp_http_validate_url/g' {} +

# ignore-files.txt :
rest-api.php
ignore-files.txt
js/dist/url.js
Requests/src/Transport/Fsockopen.php
Requests/src/Transport/Curl.php
update.php
sitemaps/class-wp-sitemaps-provider.php
functions.php
http.php
rest-api/endpoints/class-wp-rest-pattern-directory-controller.php
#

if it helped you, you are welcome.