Tuesday, March 6, 2018

Wordpress Permissions - Upload plugin using wp-admin

Upload plugin using wp-admin without ftp.

If you are not able to install plugin using wp-admin because of forbidden error or a permission issue, you simply change the permission of whole wordpress directory to fix it. That is very dangerous and a common security loophole.

Here is the minimum permission for your plugin directory which is enough to instal plugin using wp-admin.

Give 777 to wp-content/plugins and wp-content/upgrade Non-Recursively. It will allow admin to install plugin using wp-admin.


postgresql error : ERROR: database is being accessed by other users

ERROR:  database "X" is being accessed by other users
DETAIL:  There is 1 other session using the database


Solution :
SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE pid <> pg_backend_pid() AND datname = 'database-name';
You need to replace only database name in above query.

Now you can drop the database or perform other activity what you were trying to perform.

composer update - exceeded the timeout of 300 seconds

Failed to download from source: The process  exceeded the timeout of 300 seconds.

Solution :
Increase the timeout limit globally for composer
composer --global config process-timeout 6000
Now run
composer update
You should not get timeout issue.