Reputation: 99
I am using Ubuntu and installed wordpress via:
sudo apt-get install wordpress
This installed wordpress to /usr/share/wordpress. When I go to the admin and view installed plugins, Akismet
plugin displays. But if I download a plugin and place it in /usr/share/wordpress/wp-content/plugins directory (even after trying chmod 777 plugin-dir
), the plugin doesn't show in the admin. If I remove the Akismet
plugin, it disappears from the admin and reappears after replacing it. So, not sure why that default plugin is being found in the wp-content/plugins
directory yet no other plugin seems to work.
Edit
Only plugin files that are inside the directory wp-content/plugins/akismet are notice by the wordpress installation. Why would that be? How can I fix that?
Upvotes: 1
Views: 913
Reputation: 3923
This is nicely explained in a document that is installed with the same Debian package: /usr/share/doc/wordpress/README.Debian.gz
In short, most Wordpress sources are installed to /usr/share/wordpress
, belonging to root
, but by default Wordpress is configured to look for content under /var/lib/wordpress
. That directory tree should be owned by your web server's user (usually, apache
for Apache, www-data
for Nginx).
$ sudo chown -R /var/lib/wordpress
Notice that core plugins and themes are symlinked from /var/lib/wordpress
to /usr/share/wordpress
, so they actually are under ownership of root.
Akismet is one of those core plugins; it is installed as a symlink.
$ ls /var/lib/wordpress/wp-content/plugins/
akismet -> /usr/share/wordpress/wp-content/plugins/akismet/
That is why other plugins are only found after moving them into the same folder: they are found by the Wordpress installation through the symlink.
Do not install plugins under /usr/share/wordpress/wp-content/plugins
, but under /var/lib/wordpress/wp-content/plugins
.
Upvotes: 0