I have added a plugin to my WordPress site. How can I get the source code of this plugin?
Here are some ways how we can view the
.php source code for plugins:
Visit the Plugins page and press the Edit link beneath the plugin name.
For example if we want to check out the bbPress source:
this link will take us to:
We can also visit the
/wp-admin/plugin-editor.php page and select the plugin to edit.
But this will not work if we got:
define ( 'DISALLOW_FILE_EDIT', true );
I don’t recommend editing plugin files through this editor. If we break something, we might not be able to access it again through the admin pages.
On the server hosting our files, we most likely find the plugins under:
Note that it’s possible to rename the
wp-content directory through code.
We might need to access the server via ftp, sftp, ssh or through some web file managers.
If the plugin is avialable on wordpress.org, we can check out the
For bbPress the path is:
and here’s the screenshot:
Many plugins are available on GitHub or Bitbucket. Even mirrors for the wordpress.org plugin SVN repository.
If you have the .zip file, you can open it and view the source files from there.
ps: bbPress was just a random plugin that I used for demonstration.