Question
Moving wp-content to block storage volume
Because I’m running out of space, I’m trying to move my wp-content folder to a block storage volume. (from /var/www/html/ to /mnt/folder)
I tried creating a symlink from the wp-content to the new wp-content folder but that doesn’t seem to work. Then I tried using the following code in the wp-config file:
//define('WP_CONTENT_DIR', '../../../../mnt/folder/wp-content');
//define('WP_CONTENT_URL', 'https://site/wp-content');
//define('WP_PLUGIN_DIR', '../../../../folder/content/plugins');
//define('WP_PLUGIN_URL', 'https://site/wp-content/plugins');
//define( 'PLUGINDIR', '../../../../mnt/folder/content/plugins');
It seemed to work, for the most part. But when I enable any plugins I get an MSQL warning saying there are too many connections. I get locked out of the admin dashboard but I can fix it by renaming the plugins folder(to disable the plugins).
I found some information here:
https://www.digitalocean.com/community/questions/how-can-i-connect-wordpress-media-library-to-one-or-multiple-block-storage-volumes
I’d really appreciate some help.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×