Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4899

Networking and servers • Re: Self hosted site very slow from outside

$
0
0
... but the images do not load at all...
That points to Wordpress not being configured correctly for external access.

WP has a habit of storing the internal address (often it's IP address) as part of the data for images within its database and when accessed from an external URL or via your IP address the link to the media directory fails.

Fixing this is a bit of a pain:

1) The best practise is to use a domain name for the site.
2) Internal access should be via this domain name and not via IP address / local server name - this can be done with a hack in the HOSTS file or better a local DNS server if your router does not allow hair pinning (NAT loopback)
3) External access should be via public IP address (and a reverse proxy in front of the firewall etc server) or possibly via Cloudflare tunnels (which will also sort the internal access if you have hair pinning issues)
4) Certificates should be issued to the external URL and not the server (the Docker based NGINX Reverse Proxy Project comes in handy here and runs well on the Pi under Docker).

The hard (well messy) bit becomes converting your current data to this URL - there are add-ins that will backup the data and restore it with a new URL (a web search will show them). Obviously control files / add-ins and scripts will need to be converted. See https://www.wpbeginner.com/wp-tutorials ... p-by-step/ for some help on this bit.

edit: You may have to change any web server redirects / config files as the site name changes...

Statistics: Posted by MiscBits — Wed Feb 21, 2024 12:53 am



Viewing all articles
Browse latest Browse all 4899

Trending Articles