I have my wordpress server set up using php, mysql, and apache on my raspberry pi. I also have a dynamic dns hostname and configured my router's port forwardiing settings.
When trying to access my server from outside of my local LAN, when I type in my dynamic dns host, (for example, my phone on 4G mobile network or at school), the site incorrectly redirects to the server's local IP address: 192.168.0.18 so the page fails to load up.
This is very weird because I also have owncloud set up on my pi and in the same condition I try to access mydynamicdnshost/owncloud, it doesn't redirect me to local IP and the page loads up successfully.
I know this is a really basic problem with wordpress configuration but I simply cannot fix it. So does anyone know that please answer my question. Many thanks!