Lxw2015
Posts: 33
Joined: Fri Feb 12, 2016 4:05 am

wordpress host

Thu Sep 05, 2019 8:53 pm

follow the
https://projects.raspberrypi.org/en/pr ... -wordpress
setup a wordpress web, on Pi 3.

worked fine on 1 subnet. 10.79.97.31 is Pi's IP address. in same subnet, on anther PC. I could browse the Web on my Pi by enter 10.79.97.31

then I moved my Pi 3 to another network. and my Pi 's IP address is 192.168.0.10.
in this subnet on a PC, I browse 192.168.0.10
I expect the web on my Pi shows up. but it didn't.

I also tried on my Pi's browser, enter http://localhost also could not see my Web.

anyone have idea why not work?

thanks
Woo

nigelbartlett1
Posts: 32
Joined: Mon May 06, 2019 9:39 am
Location: London UK

Re: wordpress host

Sat Sep 07, 2019 8:25 am

The first problem to address is your site not working when you access it as local host from your Pi.
Run these commands on your Pi. First, is Apache running?

Code: Select all

sudo systemctl status apache2
If not, try restarting it

Code: Select all

sudo systemctl start apache2
If this fails report the results of

Code: Select all

sudo journal to -xe

Andyroo

Re: wordpress host

Sat Sep 07, 2019 12:36 pm

Another possibility is that you had set up the firewall to restrict access to port 80 on the 10.79.97.xx range only

This can be checked with

Code: Select all

sudo ufw status verbose

nigelbartlett1
Posts: 32
Joined: Mon May 06, 2019 9:39 am
Location: London UK

Re: wordpress host

Sat Sep 07, 2019 5:00 pm

@Andyroo: No, ufw does not block ports on local host in my experience, so this doesn’t account for what the OP is seeing.

Andyroo

Re: wordpress host

Sat Sep 07, 2019 5:33 pm

nigelbartlett1 wrote:
Sat Sep 07, 2019 5:00 pm
@Andyroo: No, ufw does not block ports on local host in my experience, so this doesn’t account for what the OP is seeing.
I've never tried it to be honest :lol:

edit: So i did :lol: - I bow to your superior knowledge and thank you teaching me another quirk for firewalls :)
Last edited by Andyroo on Sat Sep 07, 2019 5:50 pm, edited 1 time in total.

User avatar
neilgl
Posts: 1188
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: wordpress host

Sat Sep 07, 2019 5:37 pm

This could be the Wordpress installation using the old IP address (hard coded in some tables) and not the new one. Maybe check that first?

Andyroo

Re: wordpress host

Sat Sep 07, 2019 5:39 pm

neilgl wrote:
Sat Sep 07, 2019 5:37 pm
This could be the Wordpress installation using the old IP address (hard coded in some tables) and not the new one. Maybe check that first?
Normally that gives some text out - often just missing the CSS and pictures.

If this is the case then there are a few addins / PHP scripts that will sort the database out.

Lxw2015
Posts: 33
Joined: Fri Feb 12, 2016 4:05 am

Re: wordpress host

Mon Sep 09, 2019 3:14 pm

thanks for all you guys reply. I'll try your ideas, and get back to you.

Lxw2015
Posts: 33
Joined: Fri Feb 12, 2016 4:05 am

Re: wordpress host

Tue Sep 17, 2019 3:27 pm

on Pi 3, browse localhost works. wordpress web page displayed. Maybe my first experiment messed up.

today I tried follow the instructions https://projects.raspberrypi.org/en/pr ... -wordpress install wordpress on Pi 4. failed at this step. any one have same issue? how to solved it?

[email protected]:/var/www/html $ sudo apt-get install mysql-server php-mysql -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package mysql-server is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
mariadb-server-10.0

E: Package 'mysql-server' has no install

Andyroo

Re: wordpress host

Tue Sep 17, 2019 4:13 pm

Its a bit rough around the edges but for Buster https://www.raspberrypi.org/forums/view ... 1&t=249882 will get you up and running.

I've not got a Pi handy at the mo to finish the work (see my last post here) but you may not need those modules.

Return to “Networking and servers”