giovedì 19 settembre 2013

Fixing WordPress’ Plugin FTL download permissions (WordPress 3.3.1 on CentOS Linux)

Hav­ing trou­ble with Word­Press’ auto update fea­ture? Con­fronting errors like "could not copy file…"  or is Word­Press ask­ing for FTP information?

Your prob­lem is most likely server per­mis­sions. If you have shell access to your own VPS/dedicated server, use the lines below. If you’re using a shared host­ing setup, try option #4 below, or con­tact your admin­is­tra­tor for help.

Option #1: chmod 777

Sure, you could CHMOD 777 your whole site. That would tech­ni­cally work, but it’s switch­ing per­mis­sions when­ever you need to update is incon­ve­nient. And, leav­ing per­mis­sions this way leaves you open to a whole host of secu­rity issues.
chmod -R 777  (Not Secure!)

Option #2: apache file permission

This gives apache full per­mis­sions. This works, but if you use FTP, users no longer have per­mis­sions to write files. No good! I want my FTP access intact.
chown -R apache:apache  (No FTP!)

Option #3: apache /w group permissions

I cre­ated a “word­press” group and added my FTP users to it and gave the wp-content direc­tory group write per­mis­sions. It’s a bit of a com­pro­mise, but it worked for me.
groupadd wordpress
useradd -G wordpress 
chmod -R 775 /wp-content/
chown -R apache:wordpress 

Option #4: wp-config constants

Another option for those who are unable to change file per­mis­sions, and/or have a rel­a­tively new ver­sion of Word­Press, is to bypass enter­ing FTP infor­ma­tion by defin­ing your FTP info in your wp-config.php file. More infor­ma­tion can be found in the Word­Press codex.
define('FS_METHOD', 'ftpext');
define('FTP_BASE', '/path/to/wordpress/');
define('FTP_CONTENT_DIR', '/path/to/wordpress/wp-content/');
define('FTP_PLUGIN_DIR ', '/path/to/wordpress/wp-content/plugins/');
define('FTP_USER', 'username'); 
define('FTP_PASS', 'password');
define('FTP_HOST', '');

18 commenti:

  1. I am very happy when read this blog post because blog post written in good manner and write on good topic. Thanks for sharing valuable information…....

  2. This is a nice article..Its very easy to understand ..And this article is using to learn something about it..

  3. Thanks for sharing this useful info. Keep updating same way.

  4. I see the superlative contents on your blogs and I perfectly enjoy going through them. Thanks for sharing this useful info. Keep updating same way.

  5. I appreciated your kind way of knowledge.Great Stuff Here..hope more to come.Nice work!
    by Homework Assignments provider

  6. I actually delighted in the insign you express to the subject, awe motivating stuff ..
    by BCOM 275 provider

  7. Thanks for large information you compose it very clean. I am very fortuitous to get this tips from you.
    by MKT 571 Entire Course provider

  8. Website designer company is a famous outsourcing web design and development organization.We having many experienced website designers and developers in the field of creating outsourcing website and we treats every client with same level of consideration.

    Web Design Companies Bangalore | Web Designers Bangalore

  9. You need to kill time, you need entertainment. Refer to our website. hope you get the most comfort.
    Thanks you for sharing!
    Friv 4

  10. Thank you for providing the information here about Wordpress blog. And i want to learn more about this. So please keep update like this.

    SEO Company in Chennai

  11. Bluehost is ultimately the best hosting provider with plans for all of your hosting requirements.

  12. I am very happy when read this blog post because blog post written in good manner and write on good topic. Thanks for sharing valuable information

    Bangalore Web Designing Company, Web Development Company Bangalore

  13. Interesting blog which attracted me more.I hope you will post more update like this.
    Digital marketing company in Chennai


  14. Its a wonderful post and very helpful, thanks for all this information. You are including better information regarding this topic in an effective way.Thank you so much

    Personal Installment Loans
    Payday Cash Advance loan
    Title Car loan
    Cash Advance Loan

  15. very very amazing explaintion....many things gather about yourself...yes realy i enjoy it
    SEO Company in India