In WSL2 wp-config.php is not writable, chown and chmod not working – how to make it writable?

I’m on WSL2 Ubuntu – while getting a copy of my friends WordPress website from ChemiCloud to my local env I got stuck on this error:

A definition of a site url or home url was detected in your wp-config.php, but the file is not writable. Set your wp-config.php to writable and reload this page.

I’ve tried to adjusting its permission both with chmod and chown on the file level for both .htaccess and wp-config.php and entire root level to maximum permissions possible and the error still persists.

My local env stack is WSL2 / Ubuntu 22 / PHP8.1 / Apache 2.4 / MySQL Server 8 / phpMyAdmin

What else can I try to solve this?

Leave a Comment