Open
Description
When saving changes to a theme to which it does not have write permissions, the file_put_contents
function will output an error in debug.log
.
But the plugin will still say it succeeded in the editor. This leads to the destruction of user changes, without them being saved to the files
The error:
[24-Apr-2025 17:46:58 UTC] PHP Warning: file_put_contents(/var/www/html/wp-content/themes/qip-wp-themes/merryclaude2025/theme.json): Failed to open stream: Permission denied in /var/www/html/wp-content/plugins/create-block-theme/includes/create-theme/theme-json.php on line 6
After fixing the permissions, the plugin saved perfectly.