[Solved] Wordpress going online trouble...

Having issues with your DietPi installation, or, found a bug? Post it here.
skyfly555
Posts: 81
Joined: Tue Nov 17, 2015 12:16 pm

[Solved] Wordpress going online trouble...

Post by skyfly555 »

Hello,

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 :D
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 :D

First of all, WP was configured
wp_options --> site url --> 192.168.1.13 (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 192.168.1.13/wordpress/wp-login.php, 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.
micro_httpd

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?

Thanks!
Last edited by skyfly555 on Thu Dec 03, 2015 9:58 am, edited 3 times in total.
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: Question about Wordpress post-installation process...

Post by Fourdee »

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.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
skyfly555
Posts: 81
Joined: Tue Nov 17, 2015 12:16 pm

Re: Question about Wordpress post-installation process...

Post by skyfly555 »

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.
Attachments
Captura de pantalla 2015-11-25 a las 22.20.36.png
skyfly555
Posts: 81
Joined: Tue Nov 17, 2015 12:16 pm

Re: Question about Wordpress post-installation process...

Post by skyfly555 »

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.
Locally it works
Locally it works
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.
From the outside it works
From the outside it works
I've seen here: http://everyday-tech.com/wordpresspi-wo ... pberry-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: http://dietpi.com/phpbb/viewtopic.php?f ... art=10#p52 but I've had an unexpected trouble... when I try to go into my local IP, 192.168.1.13, 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- ... -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,
skyfly555
Posts: 81
Joined: Tue Nov 17, 2015 12:16 pm

Re: Localhost Solved-->Wordpress going online trouble...

Post by skyfly555 »

Solved on localhost.

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

When I get home I'll check from other computers in the local network (i'm doing this through VNC session).
Pilovali
Posts: 81
Joined: Sat Oct 03, 2015 7:11 pm
Location: The Netherlands
Contact:

Re: Localhost Solved-->Wordpress going online trouble...

Post by Pilovali »

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.
skyfly555
Posts: 81
Joined: Tue Nov 17, 2015 12:16 pm

Re: Localhost Solved-->Wordpress going online trouble...

Post by skyfly555 »

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,
Pilovali
Posts: 81
Joined: Sat Oct 03, 2015 7:11 pm
Location: The Netherlands
Contact:

Re: Localhost Solved-->Wordpress going online trouble...

Post by Pilovali »

skyfly555 wrote: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 10.0.0.2, if I want to access my Pi, I just go to http://mywebsite.nl instead of http://10.0.0.2.
If I go to http://10.0.0.2 it redirects to http://mywebsite.nl.
skyfly555
Posts: 81
Joined: Tue Nov 17, 2015 12:16 pm

Re: Localhost Solved-->Wordpress going online trouble...

Post by skyfly555 »

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

Thank you,
Pilovali
Posts: 81
Joined: Sat Oct 03, 2015 7:11 pm
Location: The Netherlands
Contact:

Re: Localhost Solved-->Wordpress going online trouble...

Post by Pilovali »

skyfly555 wrote: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.
Post Reply