Though you can find a soft link for the Wordpress site in ~/wordpress (for samba support I think) the actual data is in /opt/wordpress and this is where the web server looks for its files. The ownership of this is:
ls -l
total 12
drwx------ 9 pi pi 4096 Mar 14 2017 bloginabox
drwxr-xr-x 7 root root 4096 Mar 14 2017 vc
drwxr-xr-x 5 pi pi 4096 Mar 14 2017 wordpress
The web server runs under www-data so by default it has NO write ability in this folder (hence the update does not work) - this is very secure as it stops program changes from being executed by browser based users without them inheriting the root user or pi user rights.
The simplest way is to update everything from the command line

once signed in as Pi
Code: Select all
cd /opt/wordpress
wp core update
wp theme update --all
wp plugin update --all
These will then get the initial WordPress install up to date BUT it will not let you add / remove plugins etc - you can only change the pages / posts etc as these are database based!
If you do want to add plugin / themes you could manually install them into /opt/wordpress BUT it's simpler if starting out to use the built in browser tools for plugins / themes and that gets us back to the FTP message that comes up when you try an update...
To fix this we need to change the group that owns the WordPress installation and tell WordPress not to use FTP:
Code: Select all
cd /opt
sudo chgrp -R www-data wordpress
cd wordpress
sudo chmod -R g+w *
sudo nano wp-config.php
When you are in the editor, scroll down till you see the line starting define('DB_COLLATE' and add a line below so the file looks like:
/** The Database Collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );
define( 'FS_METHOD', 'direct');
/**
* Authentication Unique Keys and Salts.
NOTES:
a) Your DB_COLLATE may be different than mine
b) DO NOT CHANGE THE DB_COLLATE line else sorting will go wrong on the site!
Use ctrl-x to save and confirm you want to overwrite the current file.
You many need to restart the web server at this point and the simplest way to get everything to see the new security is:
Once the Pi is back up and running you can get into WordPress and start creating a site.
A good discussion on the FS_METHOD is
https://wordpress.stackexchange.com/que ... t-in-wp-co
As for me - I think I'll build up my version of 'blog in a box' as I've not used nginx before and it seems faster than Apache
