简体   繁体   中英

wamp + wordpress: failed to open stream: Permission denied in

I have WAMP and WordPress installed. I am trying to install a new theme. After copying it to the themes folder, when entering the themes admin panel to activate the theme I get the error:

Warning: fopen(C:\\wamp\\www/wp-content/themes/enfold/style.css): failed to open stream: Permission denied in C:\\wamp\\www\\wp-includes\\functions.php on line 3666

It looks like that: 在此处输入图片说明

And below that the page continues to render.
Have no clue why this is happening.

Check your file/folder permissions for wp-content and the theme you uploaded.

See Changing File Permissions « WordPress Codex

Typically, all files should be owned by your user (ftp) account on your web server, and should be writable by that account. On shared hosts, files should never be owned by the webserver process itself (sometimes this is www, or apache, or nobody user).

Any file that needs write access from WordPress should be owned or group-owned by the user account used by the WordPress (which may be different than the server account). For example, you may have a user account that lets you FTP files back and forth to your server, but your server itself may run using a separate user, in a separate usergroup, such as dhapache or nobody. If WordPress is running as the FTP account, that account needs to have write access, ie, be the owner of the files, or belong to a group that has write access. In the latter case, that would mean permissions are set more permissively than default (for example, 775 rather than 755 for folders, and 664 instead of 644).

To get WordPress and WAMP to automatically set permissions for a new theme, use the Admin area of WordPress to upload and install the theme. See Appearance>>Themes>>Use the Add New button.

In my case the theme folder (and the files in it) was read only and it was also encrypted.

Right click on the folder-->Properties , make sure Read-only is not selected, then click Advanced button, make sure "Encrypt contents to secure data" in not selected, hit OK and then OK again, "Apply changes to this folder, subfolders and files". That should do it:)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM