aaemnnosttv/wp-sqlite-db

Compatibility Issues with Serverless

Closed this issue · 1 comments

I'm trying to replace MySQL with SQLite, but I've encountered a troublesome issue and I hope to get your help.

My environment is Tencent Cloud's Serverless, which generates a temporary workspace when it runs. The absolute path for WordPress is /var/user/.

However, files and directories under this temporary workspace don't have write permissions, so mounting an additional file storage system (CFS) is required. The local path /var/user/wp-content corresponds to the remote path /mnt/wp-content.

Besides, I need to add define('WP_CONTENT_DIR', '/mnt/wp-content'); and define('DB_DIR', '/mnt/wp-content/database');. to the wp-config.php file.

My current problem is that if I want to use SQLite, I need to remove define('WP_CONTENT_DIR', '/mnt/wp-content');, otherwise, WordPress will only use MySQL. But if I remove define('WP_CONTENT_DIR', '/mnt/wp-content');, the /wp-content directory doesn't have write permissions, causing issues with uploading images, downloading plugins, and so on.

Issue solved. Thanks.