Using the constant overrides in wp-config I’m able to define a remote FTP server that plugins will be added to when installed using the WP interface.
define('FS_METHOD', 'ftpext');
define('FTP_BASE', '/');
define('FTP_CONTENT_DIR', '/public_html/example.com/wp-content/');
define('FTP_PLUGIN_DIR', '/public_html/example.com/wp-content/plugins/');
define('FTP_USER', 'username');
define('FTP_PASS', 'password');
define('FTP_HOST', '123.123.123.123');
What’s weird to me is that there isn’t a constant setup for themes or uploads. Themes I don’t care about (but its still weird) … I want uploads to be put on the remote server though. Ideally there would be an FTP_UPLOADS_DIR
that could be overwritten the same way.
Any ideas on how to get around this?
IMHO a better approach would be adding the remote server’s directory as a locally mounted directory and use this as wp-content directory. Doing this on the block/filesystem level means that WordPress won’t notice a thing, since it appears to WordPress as normal local directory. You may want to have a look at sshfs in order to mount the directory. Using this has the added benefits of: