can't upload plugin or theme cms wordpress on localhost #Linux

Okay now i tell a little history, after installed wordpress on localhost i can’t upload this plugin and theme.
solution you must rewritable on your where directory wordpress installed

# chmod -R 777 /var/www/htdocs/wordpress  

and now you must edit file on wp-config.php and add to under line

define('FS_METHOD', 'direct');  

may be useful :)

This post is licensed under CC BY 4.0 by the author.