{"id":31,"date":"2020-03-01T13:29:22","date_gmt":"2020-03-01T12:29:22","guid":{"rendered":"https:\/\/mic.st\/blog\/?p=31"},"modified":"2020-03-01T14:37:25","modified_gmt":"2020-03-01T13:37:25","slug":"how-to-solve-failing-installation-of-wordpress-plugins","status":"publish","type":"post","link":"https:\/\/mic.st\/blog\/how-to-solve-failing-installation-of-wordpress-plugins\/","title":{"rendered":"How to solve failing installation of wordpress plugins"},"content":{"rendered":"\n<p>I wanted to install a wordpress plugin via the wordpress panel and I failed due to missing FTP rights. An alert window appeared asking me for FTP or SFTP credentials. I pasted them in there but, this did not work.<\/p>\n\n\n\n<p>What worked for me is setting an additional snippet to my <em>wp-config.php.<\/em><\/p>\n\n\n\n<p class=\"has-normal-font-size\">Just add:<\/p>\n\n\n\n<p class=\"has-small-font-size\"><code>define('FS_METHOD','direct');<\/code> <\/p>\n\n\n\n<p>at the end of your <em>wp-config.php<\/em>. This enables some direct mode where wordpress does not need an FTP connection to install plugins.<\/p>\n\n\n\n<p>If you still get a message saying something like &#8220;directory could not be created&#8221; you need to set the owner of the plugin folder to <em>www-data<\/em> (on Apache) and the access rights to 775.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>Sources: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.hongkiat.com\/blog\/update-wordpress-without-ftp\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.hongkiat.com\/blog\/update-wordpress-without-ftp\/<\/a><\/li><li><a href=\"https:\/\/wordpress.org\/support\/topic\/installation-failed-could-not-create-directory\/\" target=\"_blank\" rel=\"noopener\">https:\/\/wordpress.org\/support\/topic\/installation-failed-could-not-create-directory\/<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I wanted to install a wordpress plugin via the wordpress panel and I failed due to missing FTP rights. An alert window appeared asking me for FTP or SFTP credentials. I pasted them in there but, this did not work. What worked for me is setting an additional snippet to my wp-config.php. Just add: define(&#8216;FS_METHOD&#8217;,&#8217;direct&#8217;);&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/mic.st\/blog\/wp-json\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mic.st\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mic.st\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mic.st\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mic.st\/blog\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":0,"href":"https:\/\/mic.st\/blog\/wp-json\/wp\/v2\/posts\/31\/revisions"}],"wp:attachment":[{"href":"https:\/\/mic.st\/blog\/wp-json\/wp\/v2\/media?parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mic.st\/blog\/wp-json\/wp\/v2\/categories?post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mic.st\/blog\/wp-json\/wp\/v2\/tags?post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}