I ran 2019-07-10-raspbian-buster-full.zip on pi4.
follow https://www.makeuseof.com/tag/host-word ... pberry-pi/ set wordpress.
I could browse localhost on pi. it show wordpress's sample page.
but on another PC in same LAN, browse pi_ip_address. it display text only.
anybody give a hint, why this happens?
thank you for reading.
Xian
wordpress on pi4 ( solved )
Last edited by Lxw2015 on Fri Oct 11, 2019 11:08 pm, edited 1 time in total.
Re: wordpress on pi
It does not have the rewrite module running let alone cover the config of the site in Apache.
I’ll not mention the security risk of giving root access to everything via Wordpress or the not needed steps and wrong password use
Though I am month behind this may help https://www.raspberrypi.org/forums/view ... 1&t=249882
I’ll not mention the security risk of giving root access to everything via Wordpress or the not needed steps and wrong password use

Though I am month behind this may help https://www.raspberrypi.org/forums/view ... 1&t=249882
Re: wordpress on pi
Review the page source in your browser. If you see "http://localhost", try this: https://wordpress.org/support/article/c ... -site-url/
"http://localhost" is working only if you access Wordpress from a browser on your Raspberry Pi.
"http://localhost" is working only if you access Wordpress from a browser on your Raspberry Pi.
-
- Posts: 42
- Joined: Sat Mar 02, 2019 8:08 pm
- Contact: Website
Re: wordpress on pi
I don't know if it helps but -
I covered installing Wordpress on Pi using a BASH script here:
https://geektechstuff.com/2019/01/09/in ... bperry-pi/
And here is an awesome Raspberry Pi guide to setting up Wordpress:
https://projects.raspberrypi.org/en/pro ... ordpress/7
When you say it only displays text, I assume you mean it is not displaying any images - this may be a permissions issue depending on where on the Pi you are storing the images.
I covered installing Wordpress on Pi using a BASH script here:
https://geektechstuff.com/2019/01/09/in ... bperry-pi/
And here is an awesome Raspberry Pi guide to setting up Wordpress:
https://projects.raspberrypi.org/en/pro ... ordpress/7
When you say it only displays text, I assume you mean it is not displaying any images - this may be a permissions issue depending on where on the Pi you are storing the images.
www.geektechstuff.com
Re: wordpress on pi
The Pi one is out of date (I’m trying to get time to master Github to do a pull).
It’s possible that the CSS is not loading (the description is a bit vague on the resulting screen).
WP has a horrid habit of embedding the URL of the site into image locations in the database so it may work fine till you change the site name (localhost to IP address to domain name) - there are a few add-ins that are designed to fix this as part of a site move and I’ve seen at least one set of SQL instructions embedded in PHP to fix this.
It’s possible that the CSS is not loading (the description is a bit vague on the resulting screen).
WP has a horrid habit of embedding the URL of the site into image locations in the database so it may work fine till you change the site name (localhost to IP address to domain name) - there are a few add-ins that are designed to fix this as part of a site move and I’ve seen at least one set of SQL instructions embedded in PHP to fix this.
Re: wordpress on pi
This guide is so similar to the guide used by the original poster, that you can't tell which is the chicken and which is the egg. It shows that it is possible to install Wordpress but not how it should be installed. It's surely not awesome.geektechstuff.com wrote: ↑Thu Oct 10, 2019 9:46 pm...
And here is an awesome Raspberry Pi guide to setting up Wordpress:
https://projects.raspberrypi.org/en/pro ... ordpress/7
...
Re: wordpress on pi
yes, no image. seems CSS not working. I don't know where the image is stored. that is all managed by wordpress.geektechstuff.com wrote: ↑Thu Oct 10, 2019 9:46 pmI don't know if it helps but -
I covered installing Wordpress on Pi using a BASH script here:
https://geektechstuff.com/2019/01/09/in ... bperry-pi/
And here is an awesome Raspberry Pi guide to setting up Wordpress:
https://projects.raspberrypi.org/en/pro ... ordpress/7
When you say it only displays text, I assume you mean it is not displaying any images - this may be a permissions issue depending on where on the Pi you are storing the images.
Re: wordpress on pi
thank you.Andyroo wrote: ↑Thu Oct 10, 2019 10:07 pmThe Pi one is out of date (I’m trying to get time to master Github to do a pull).
It’s possible that the CSS is not loading (the description is a bit vague on the resulting screen).
WP has a horrid habit of embedding the URL of the site into image locations in the database so it may work fine till you change the site name (localhost to IP address to domain name) - there are a few add-ins that are designed to fix this as part of a site move and I’ve seen at least one set of SQL instructions embedded in PHP to fix this.
please see my screen clip in upper post.
Re: wordpress on pi
Have you installed the rewrite module in Apache?
Did you set anything for permalinks in Wordpress?
Did you set anything for permalinks in Wordpress?
Re: wordpress on pi
Did you ever try to figure out, where your browser is asking for the CSS, that don't work?
E.g. https://wordpress.org/support/article/c ... -site-url/ shows a Wordpress help page, that explains, how you can change “WordPress Address (URL)” and “Site Address (URL)” settings of your installation. The page source contains a lot of links to stylesheets
If your page contains links beginning with http://localhost, these styles are available only if your browser is running on your Raspberry Pi. Please follow this help page to configure the IP address (e.g http://10.74.32.140) or a domain name (http://raspberrypi.local) instead as “WordPress Address (URL)” and “Site Address (URL)”.
If this doesn't help, start over and do the initial Wordpress configuration in a browser on your remote PC.
E.g. https://wordpress.org/support/article/c ... -site-url/ shows a Wordpress help page, that explains, how you can change “WordPress Address (URL)” and “Site Address (URL)” settings of your installation. The page source contains a lot of links to stylesheets
Code: Select all
...
<link rel='stylesheet' id='dashicons-css' href='https://wordpress.org/support/wp-includes/css/dashicons.min.css?ver=5.3-beta3-46457' type='text/css' media='all' />
<link rel='stylesheet' id='admin-bar-css' href='https://wordpress.org/support/wp-includes/css/admin-bar.min.css?ver=5.3-beta3-46457' type='text/css' media='all' />
...
If this doesn't help, start over and do the initial Wordpress configuration in a browser on your remote PC.
Re: wordpress on pi
.htaccess and the rewrite module takes care off redirects from the local machine to a given URL (IP address).
In true WP tradition though, some of the locations are hard coded in the database and not in a separate field but actually embedded in text strings
If you do not want to use a plugin then https://snapcreek.com/blog/wordpress/te ... ress-site/ have a good walkthrough from fixing the site address. The tool they link to is https://github.com/interconnectit/Search-Replace-DB and I’ve not used it for around 12-18 months but it’s been really handy moving live sites to test boxes when the original site is only on the live server

In true WP tradition though, some of the locations are hard coded in the database and not in a separate field but actually embedded in text strings

If you do not want to use a plugin then https://snapcreek.com/blog/wordpress/te ... ress-site/ have a good walkthrough from fixing the site address. The tool they link to is https://github.com/interconnectit/Search-Replace-DB and I’ve not used it for around 12-18 months but it’s been really handy moving live sites to test boxes when the original site is only on the live server



Re: wordpress on pi
I ran
sudo a2enmod rewrite
sudo systemctl restart apache2
to enable rewrite url, refresh browser. same result.
I did not change permalinks in Wordpress. it sets as Custom Structure /index.php/%year%/%monthnum%/%day%/%postname%/
Re: wordpress on pi
Make sure you save the permalinks.
What do you have defined in general settings for the two URLs
Also, are you aware of the ‘first steps’ document https://wordpress.org/support/article/f ... s-classic/ (the old codex)?
What do you have defined in general settings for the two URLs
Also, are you aware of the ‘first steps’ document https://wordpress.org/support/article/f ... s-classic/ (the old codex)?
Re: wordpress on pi
on my pi. everything works fine. browse localhost, or 10.74.32.140. but when I try browse 10.74.32.140 on my windows PC. I only see text.fbe wrote: ↑Fri Oct 11, 2019 6:14 pmDid you ever try to figure out, where your browser is asking for the CSS, that don't work?
E.g. https://wordpress.org/support/article/c ... -site-url/ shows a Wordpress help page, that explains, how you can change “WordPress Address (URL)” and “Site Address (URL)” settings of your installation. The page source contains a lot of links to stylesheetsIf your page contains links beginning with http://localhost, these styles are available only if your browser is running on your Raspberry Pi. Please follow this help page to configure the IP address (e.g http://10.74.32.140) or a domain name (http://raspberrypi.local) instead as “WordPress Address (URL)” and “Site Address (URL)”.Code: Select all
... <link rel='stylesheet' id='dashicons-css' href='https://wordpress.org/support/wp-includes/css/dashicons.min.css?ver=5.3-beta3-46457' type='text/css' media='all' /> <link rel='stylesheet' id='admin-bar-css' href='https://wordpress.org/support/wp-includes/css/admin-bar.min.css?ver=5.3-beta3-46457' type='text/css' media='all' /> ...
If this doesn't help, start over and do the initial Wordpress configuration in a browser on your remote PC.
Re: wordpress on pi
solved
I setup wordpress on my PC browser, rather than on my pi. then everything work as expected. both PC and PI show same page when visit 10.74.32.140 which is my pi's ip address.
the only difference is I config wordpress on pi before. and now I config wordpress on PC.
I don't know why. hope expert could shade some light.
thanks all for your help and response.
I setup wordpress on my PC browser, rather than on my pi. then everything work as expected. both PC and PI show same page when visit 10.74.32.140 which is my pi's ip address.
the only difference is I config wordpress on pi before. and now I config wordpress on PC.
I don't know why. hope expert could shade some light.
thanks all for your help and response.
Re: wordpress on pi4 ( solved )
I had the same issue as you and your solution fixed my issue. I think it has something to do with the URLs. When you set up Wordpress on the pi it uses "localhost" as your URL so only the Pi can access the Wordpress theme. When you set up Wordpress on a separate PC in the same network it uses the standard IP "192.168.x.xx". That's the only difference I could spot, hope this helps.
-
- Posts: 31
- Joined: Wed Feb 20, 2013 10:57 am
Re: wordpress on pi4 ( solved )
I have been doing the same exercise as well. It has taken me quite a while to find this answer that works. I just changed the localhost settings in the Dashboard on the Pi to the address of the Pi i.e. 192.168.1.xx. Saved and all worked great. I'll need to now make sure the IP address is fixed as opposed to dynamic now otherwise I presume it won't work.