[Solved] Wordpress going online trouble...


I will talk to you what’s happening to me, although maybe this is no the best place to ask for it. But I suppose this thing can happen to other DietPI users installing WordPress, so I will share with you all my trouble.

I’ve installed Wordpress. Perfect. I love the DietPI installer, so fast and easy :smiley:
I’ve configured NoIP, perfect.
I’ve opened the port 80 of my router, to be able to go into my Wordpress from the outside of my local network using my NoIP domain xxxxx.ddns.net, perfect.

But now I have a trouble… let’s explain the story :smiley:

First of all, WP was configured
wp_options → site url → (local network address), so it only worked from local, and I couldn’t go into it from “the outside”, using xxxxx.ddns.net/wordpress

To solve this (to be able to go into WP from “the outside” using domain name), I changed it editing WP database and set wp_options → site url → xxxxx.ddns.net

Done this, WP is accessible from the outside, but when I try to go into it from my local network the blog is shown in plain mode, only text, and when I try to login to edit it going to my local IP, it jumps to xxxxx.ddns.net/wordpress/wp-login.php, I can type user and password, but I get:
404 Not Found
File not found.

I’ve been digging into WP forums and googling a lot, and they say to change the hosts file, and some other things… but I haven’t been able to solve the trouble with this information.

Maybe do I have to do some port forwarding of whatever on my ADSL modem-router? Or does WP have an option to tell it I want to access from “both” sides, from the Internet and from local network?

If you can help me, thank you very much, I’ll appreciate a lot every information you can give me about this. Maybe you have lived this same situation and you remember how you solved it?


Wordpress is just a website with an SQL database.

Usually, a port forward of 80 TCP is all you need. As you mentioned, wordpress might have its own settings that might need changing.

I’ve never tried wordpress outside LAN. When I can, i’ll try a test installation and let you know results.

Thank you, Fourdee,

When I set the port forwarding 80, I got a message on the Comtrend router that said “This port is in use, we’ll use 8080” but I didn’t see it as being used, but instead of this message, when I look at the NAT-Virtuals Servers, it’s supposed to be set.

I attach an image, just for information.

If I find a solution, I’ll post it here, just to help people who can live the same situation if they try the same as I’m trying: a WP server on Raspberry Pi working not only into the local network.

More details…

If I set phpmyadmin-database wp-options as local IP it works perfectly locally (image attached) but from the outside it works veeery slow and only plain text.

If I set phpmyadmin-database wp-options as xxx.ddns.net it works perfectly from the outside (image attached) but locally it works veeery slow and only plain text.

I’ve seen here: http://everyday-tech.com/wordpresspi-wordpress-web-server-image-on-raspberry-pi/ how they explain how to “open” the RPI WordPress server to tle world, but this distro works using Nginx and talks about “modify servers domain name in nginx”, and in DietPI we are using LAMP. I’ve tried to get into LAMP as explained by Fourdee here: DietPi-Software | Details for ALL installation options - Page 2 - DietPi but I’ve had an unexpected trouble… when I try to go into my local IP,, or from the outside, going to xxx.ddns.org, I get a message that says “Blocked by Pi-hole.” and I don’t know how to unblock this, because Pi-hole doesn’t have much documentation on its official webpages (http://pi-hole.net/ and http://jacobsalmela.com/block-millions-ads-network-wide-with-a-raspberry-pi-hole-2-0/.

So, I don’t know what to do now. Maybe Fourdee or some of you can help me now that we’ve got more information about this trouble.

Thank you in advance,

Solved on localhost.

Open a terminal.
sudo nano /etc/hosts
Add a line: xxxx.ddns.net
It’s supposed in your hosts file you have the line that says: localhost; if not, add it.
Save hosts file.

When I get home I’ll check from other computers in the local network (i’m doing this through VNC session).

If it loads very slow, it could be that your internet is just slow.
Could you show speedtest.net results for me?

I’m running WordPress on my Pi1 512MB RAM and it’s doing just fine. Pages load within a second.

Hi, Pilovali.
I’ll check it when I arrive to home.

One question, then: how do you get into your Wordpress server from your local network? Are you using the method of modifying all hosts file in your machines, just adding the line “192.168.1.xx xxxx.ddns.net”?

Thank you fo your feedback,

My Pi is on, if I want to access my Pi, I just go to http://mywebsite.nl instead of
If I go to it redirects to http://mywebsite.nl.

And have you not configured anything on any hosts file? Have you installed WordPress using the DietPi-software option?

Thank you,

No, I haven’t used the dietpi-software option. I just downloaded the latest WordPress and unzipped it to /var/www.
Once the WordPress setup started, I just entered http://mywebsite.nl as the URL.

If you install it using the dietpi-software option, you can just edit the URL to whatever you want in the WordPress admin page.

Thank you for answering, Pilovali.

I’ll try to do a DietPi clean install, and see what happens after that, I’ll inform to you when done!

DietPi-Software uses the same installation method, and, also generates the SQL database during install.
So the setup/configuration of Wordpress should be identical.

Thank you very much, Fourdee and Pilovali,

Finally, it was soooo simple!

I did:

  1. Fresh install of DietPi with Wordpress, just “to begin again” :slight_smile:
  2. Go into the Wordpress, login, and do not touch any wp_options. So, in “siteurl” and “home”, I didn’t touch anything, and it said the local IP address: 192.168.1.x
  3. Checking from my mobile phone, connected by GPRS “to the outside”, my NoIP domain: xxxxx.ddns.net
  4. Smile. It worked perfectly, as I were at home. Now I can connect to the Wordpress from anywhere (local/Internet) without troubles, and not text-only versions, or whatever.