在RPi上使用Wordpress全新安装的问题

1) I cannot change themes. It asks me for an FTP login. I changed the connection type to direct in the config, but it doesn't change anything. Although I seem to be entering the right credentials, it says error 21, can't connect to server.

2) The webpage displays correctly on the RPi, but when I try to access the website on another computer on my local network, the webpage doesn't display properly. The best description I can give is that it doesn't have any pictures or formatting.

3) When accessing on the same computer as issue #2, the webpages don't route properly. I visit the webpage using (example) 192.168.1.22. It goes to the webpage. Then when I click on Login, it goes to localhost/wp-admin.php instead of 192.168.1.22/wp-admin.php and I am not sure why.

Picture: http://screencast.com/t/7jEgzDGZQ

Without knowing more, I can give you a bit of insight that will hopefully help.

  1. Sounds like a file permissions issue. If you want to be able to update/add themes from the admin back-end, you need to give file permissions to the web-server user/user-group (www-data many times) Also, the inability to connect via ftp, could be a firewall setting in linux. you'll have to do some research based on your distro.
  2. This is most likely in relation to #3. Basically, your client (the other computer) is looking for your CSS on localhost and it doesn't exist.
  3. Try this. Use your favorite tool (like wp-cli) to do a search-replace in the DB for localhost to your ip. Then try all these things.

Hopefully this helps you get on the right path!

  • Cheers!

issue #1: change file permisions and give wordpress write access

issue #2: as described in issue #3 localhost is used as address base, so only the RPi can load images and styles correctly. You can change the site url in admin under settings.

issue #3: see issue #2