I uploaded a couple of untouched Wordpress directories to my server and named them wordpress1, wordpress2, wordpress3 and so on. The reason behind is that I have a slow Internet Connection at home and when I had a fast Connection, I uploaded them to have them ready, when I need them.

So I renamed wordpress1 to new_website and started the install, connected to the database and all was set. I can create posts and pages. However, an upload of a file is not possible as Long as wp-uploads is not set to chmod 777. 755 is not working.

Same with changing the permalinks structure. Wordpress can't write the .htaccess file, except I chmod 777 the wordpress directory.

When I want to install a plugin, I always have to enter my FTP information so it can install.

I have other installations running on the same webspace without any issues. However, I didn't use the rename thing

Any clues what I could do here?


Per the recommended Hardening WordPress and other resources this is what you should look for in your folder permissions:

  • Root Directory / 0755
    • .htaccess /.htaccess 0644
    • wp-admin/index.php /wp-admin/index.php 0644

Based on what you've described about having to enter your FTP credentials to update/upload plugins I believe you have a ownership/group issue with your files. When you FTP'd the files up they were assigned to your FTP user/group. However, WordPress uses the same user/group that PHP runs in to access the file sytsem for writing (typically the www-data user).

Depending on your FTP program you might be able to just change the root folder and recursively apply to all children files and folders similar to sudo chown -R www-data:www-data wp-root. This will change the owner and group so that WordPress can manage the filesystem.

Your server configuration you may also put your wp-content permissions to 775. This permission will allow your group to write in this folder and the worker users in WordPress, www-data user (executes the code) and FTP user (downloads code). You can put your wp-content on 755 but you have to put your www-data as owner of this folder and make your updates manually via FTP.

EDIT: If you still struggle with the user/permissions etc and wish to bypass the FTP nag screens you can set the FTP user info into your wp-config.php. This will help WordPress gain access to the filesystem in the same method as you currently do via FTP.

define("FTP_HOST", "localhost"); // put the external path if localhost doesn't work
define("FTP_USER", "ftpUsername");
define("FTP_PASS", "ftpPassword");
  • Thanks. Root is 755, .htaccess and wp-admin/index.php is 644. I am using Filezilla on a shared Webspace. I dont have Access to a CLI. I see the id of user and Group in Filezilla next to each file which is the same as on my other WP installations (where it works with these IDs). Also, 775 doens't work, only 777 – los_shadows May 6 '14 at 13:03
  • Interesting, it could be a way the file was uploaded via FTP and the way the server user/group settings are done. I did extend my answer with the ftp info option at the end, you might try that to help. – codearachnid May 7 '14 at 1:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.