'Why wordpress can't write files using php with xampp in localserver

I am using xampp from longtime without have this problem in my localhost. But suddenly all of my Wordpress product can't write file. It give error don't have access permission.

Also when I try to install new Wordpress it give me "Unable to write to wp-config.php file"

How can I give xampp or PHP give full access of xampp document folder ("htdocs" I has change it default htdocs folder)?



Solution 1:[1]

You have to give permission to your localhost.

This answer should solve your issue: https://stackoverflow.com/a/51565645/4781377

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 saffront