daniel77
Posts: 1
Joined: Sat May 25, 2019 5:30 am

Internet: Wordpress slow, Pi-Hole instant?

Sat May 25, 2019 5:33 am

Hi Guys,

I experimented a bit with my PI and wanted to set up a web server with WordPress. I manage to access my raspberry from the internet but WordPress acts weirdly. Inside my network, everything works fine, but when I access it from the internet, Wordpress it loads extremely slow, without any pictures or structure (looks like a broken website from the 90s) https://sarkariresult.onl/
Pi-Hole on the other hand loads instant with all the pictures and graphics. (the Web interface)
According to my Apache2 ports config, I use just standard ports, who I have forwarded (80 and 443) Mobdro

I would understand if it would not work at all, but working poorly? I'm now on it for the last 4 hours and I thought I ask as probably someone else had the same issue :P https://pnrstatus.vip/
Last edited by daniel77 on Thu May 30, 2019 9:35 am, edited 1 time in total.

Andyroo
Posts: 2964
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Internet: Wordpress slow, Pi-Hole instant?

Sat May 25, 2019 11:00 am

WordPress is a little odd in how it handles graphics and layout.

For some historic reason, images have the IP address of the server embedded in the database rather than using a reference to their location from the root / index page.

The reason you are not seeing them is that your browser is being told to load the image etc from the local address but as you are external to the network you cannot get to it so the page comes out wrong :? :roll:

What makes it worse is if you name your site with a domain name that gets embedded so it’s a pain to move sites from one domain to another.

Fixing this is a bit of a pain and depends how much work you have done. Starting afresh is simplest if you only have the basic theme but I’ll assume you have lots of bits done :lol: Read all before starting any steps.

1) Set yourself up with a domain name - any host will be fine even a free one and you do not need any website or email service
2) Set the domain up to point at your IP address. If you have dynamic IP use a service to keep the domain pointing to you. Check your router, it may support this for you else you will need to run the client software on a computer in the network
3) Check Apache has the rewrite module installed and has the rewrite rules for WordPress set up in .htaccess
4) Load and run https://github.com/interconnectit/Search-Replace-DB and change the old internal IP address to the new domain
5) Set Apache up to use the new domain as the site
6) Restart Apache and you should not need the backup you took at the start. You did take one did not you :lol:

That’s not a quick job and it’s a very short summary of each step. Have a read over it and shout if you get stuck THOUGH you will find lots of articles on the web and you may do best to join one of the WP forums as this is a application issue rather than a Pi one - personally I do not mind and will keep an eye on this thread.
Need Pi spray - these things are breeding in my house...

Return to “General discussion”