WP Developer Assistant
WP Developer Assistant is a WordPress plugin developed by a WordPress developer for WordPress developers.
- Have you ever needed to run a query when you didn’t have access to phpMyAdmin or SSH?
- Don’t you hate it when you need to upload a plugin, theme, or other file and don’t have FTP access?
- Have you ever wondered where that action or filter hook gets called?
- Want to enable errors while hiding them from everyone else?
- Wouldn’t it be great if you could output a full listing of PHP global variable values on each page so debugging would be easier?
- Ever wanted to modify one of those serialized options?
- Would you like to quickly see a full list of defined constants?
It’s thoughts like these that caused me to make this plugin. WP Developer Assistant is the first WordPress plugin of its kind. It essentially is a toolkit that makes life as a WordPress developer easier.
Current Features
-
Developer

This page sets the persistent states of the WP Developer Assistant plugin. From this page, you can select to display specific error output from PHP and to display values for PHP global variables. This data will be output on any page you visit in your site, whether it is the front page, archives, or an admin page.
The really cool feature of this is that only your user sees the effects of these setttings. Anyone who is not logged in or is logged in as a different user won’t see the error messages or variable output.
-
Options
I’ve often found the options screen that is built into WordPress to be very limiting. There are times where some of the serialized data becomes corrupted for one reason or another, and there aren’t any good ways to fix the problem. Now you can edit even the serialized data fields.
I also don’t like how you can’t add or remove any options, so I want my options page to offer that ability. This is still in the testing phases and should be added soon.
-
Hooks
Actions and filters add amazing flexibility to WordPress. I think that they are one of the reasons that WordPress is so successful. As a developer, the amazing amount of available hooks are staggering. Add on top of that the fact that the Codex never seems to be up-to-date about what hooks are available and which versions support what hooks. There’s always the question of what is already set on this hook, where does that get set, and what options has it been set up with. Then you have the problem of remembering what arguments are passed to the hook when it’s called.
After a lot of thought about the best way to keep track of what is the current state of available and used hooks, I realized that I should just let the code tell me. Essentially, the plugin searches the WordPress root install, WPINC (wp-includes), wp-content, PLUGINDIR (wp-content/plugins), and wp-admin directories for hook functions. All the directories except the root install directory are searched recursively.
It might seem funny to search the plugin directory since it is inside wp-content. I do this to handle cases where the plugin directory has been moved elsewhere.
For add_action and add_filter calls, the hook name, function name, priority, number of accepted arguments, source file name, and file line number are shown. For do_action and apply_filters calls, the hook name, passed attributes, source file name, and file line number are shown.
Over time, I aim to use this tool to help tighten up the relevent parts of the Codex in order to keep it up to date.
-
Run Query
The Run Query tool is extremely simple but immensely helpful. If you know how to write a query, you can access, add, and modify table data. You could even add, modify, and remove tables if you were so inclined.
It was my idea for this tool that caused me to create this plugin. I thought to myself, “why should I have to write a plugin just to be able to execute this one query?” The answer was quick and absurdly obvious: create a plugin that could execute any query.
With just this little text area, you can do anything you want with the database as long as the user has sufficient permissions. I have an idea to also offer an embedded phpMyAdmin. If enough people like the idea of having the phpMyAdmin interface as well, I’ll look at adding it.
-
PHP Info
This page is also simple. It just calls phpinfo() which dumps all of its data to the screen. I need to clean this up so that it doesn’t embed a full HTML document inside the page. Even though it’s so dirty, it still works very well.
-
Defines
Just like the Hooks page, the Defines page searches through the WordPress folder structure for matches.
By default, only constants that are declared in WordPress source files are shown. If you click “Show All Defines”, a full list of available constants will be generated with constants defined outside the WordPress source being marked as such. The name, the current value, the value declared by the specific line of code, the source file name, and the file line number are shown for each constant.
-
Upload Files
I imagine that this page will be the main reason most people will use this tool. The Upload Files page allows you to add file(s) to the WordPress installation completely from inside WordPress. No longer do you need FTP access just to add that new plugin, try out a new theme, or to easily add a file to your downloads area.
You can supply the file by specifying a URL location for the server to grab the file from or by selecting a file on your computer.
You have four destination options: Uploads will use the standard storage mechanism of WordPress to store the file in the Uploads directory; by default, it will store in subdirectories representing the year and month of the upload. Plugin will cause the upload to store in the plugins directory. Theme will store the file in the themes directory. Finally, you can use Manual Path to provide a path of your own chosing (the path must be relative to the root installation directory of WordPress).
There are a number of options to control how the upload handles overwriting and renaming files. This should be fairly self-explanatory.
The really interesting bit at the bottom is where it will automatically extract archive files at the destination. This is useful for loading plugins or themes without having to resort to saving it to your computer, extracting the files, and then loading each file up. Archives with the following extensions (and matching encoding schemes) are supported: zip, tar, gz, tar.gz, tgz, tar.bz2.
One thing to be careful about when extracting archives is that some archives don’t properly have a containing folder like they should. It’s for this reason that I provided the “Force files to be extracted inside a folder” option. If this option is selected, the archive will be extracted to a folder with the same name as the archive minus the extension. Note that it will do this irregardless of whether or not the archive contained files already inside a folder. It is advisable to look at the plugin on your computer first before trying to upload it to the server to verify whether or not forcing a containing folder is necessary.
Thanks to File_Archive developed by Pablo Fischer, I was able to provide the extraction ability irregardless of server operating system. I have not tested his code extensively since I only have access to Linux-based servers. If you have any problems with the extraction ability, please contact me.
Well, those are all the functions I could manage to cram into the first version without taking too long to release it. If you look at the code, you’ll see that I have a lot of ideas for the future of this tool. A few of my main ideas follow, please let me know if any of them would be useful to you so that I know which features to prioritize.
Planned Features
- *in development* Enable adding and removing of items from the options table through the Options page.
- *in development* A search page to search through files in the WordPress install. Think of it as a grep utility built into WordPress. This will be good for tracking down those pieces of code or text that you just can’t seem to find.
- Verification tool to quickly assess whether or not the core WordPress files and database tables have been modified. This will be useful for planning version upgrades.
- Tool to allow viewing the site with different themes without actually changing the theme.
- HTML validation… I’m not too sure that this one is readily possible, but it’s an interesting back-burner / rainy day idea.
- Provide a phpMyAdmin interface
- Robust database backup and restore tools. These would most likely be linked to some of the plugin’s functions to automatically backup the database before any modifications are made.
- Enhanced file management. The main thing I’d like to offer is editing of any text file within the WordPress root installation directory. Just think of all those files that the plugin and theme editors don’t give access to.
- Sidebar repair tool. Have you ever killed a sidebar with a messed up widget? This tool would allow for selectively removing specific widgets from specific sidebars.
Warning
This plugin should be considered to be in alpha stage. Thus, you should always back up your database before using any functions that modify tables. I cannot be held accountable for any loss of data, loss of time, or security problems created by this plugin.
If you are unsure about using this plugin, please wait until it has been sufficiently tested by others first. Even then, you should always take precautions by regularly backing up your data.
Security Concerns
Keep in mind that this data will most likely be going through insecure HTTP communications. Some of the data that is exposed may make the site vulnerable if it is sniffed by the wrong people. I have tried to ensure that the most dangerous data (database access information, secret keys, etc) are filtered, but I don’t guarantee that I covered everything or that what I covered is sufficient to meet your desired level of security.
Requirements
- WordPress 2.2+ - This is as far back as I’ve tested the plugin. I’ve gone through each iterative version backwards, and I have yet to find a version back to 2.2 that this plugin doesn’t work with. If you have different results, please let me know.
- PHP 5+ - I have seen some problems with running some of my code on servers with old versions of PHP. From my experience, if you have PHP 5 or above, the code should run without errors since I’ve purposefully avoided PHP 6 functions and constructs.
Versions
- 1.0.1 - released on June 26, 2008
Initial concept
Thanks
- Arne Brachhold for providing some code that I found useful and incorporated into WP Developer Assistant.
- Henning Schaefer for PlugInstaller which was an inspiration for the File Upload page.
- Pablo Fischer for File_Archive which powers the extraction process for uploading archives.
Download
Please visit the WP Developer Assistant page on WordPress.org to download. Further information and installation instructions can be found there.
Donations Welcome
I’ve already put in countless hours and many extremely late nights into the development of this plugin. If you would like to donate to this project so that I can devote more time to development on this plugin and others like it, please click the button below. Thank you.
29 Comments so far
Leave a reply







Thanks for this. You was help me. Article who your writen was so important for me. Thanks again
[...] WP Developer Assistant [...]
Although I’m not a developer (PHP still baffles me really), I can already see this plugin being *uber* useful, especially *for* developers!
Thank you!
Even I would want to start tinkering around (on a local install of course) with this plugin. The hooks + actions part sounds particularly exciting!
I’m glad that you like it Flick. I was really excited by the hooks section myself. The problem is that the Codex is never truly up to date. My code actually looks through the files themselves to find out what hooks are defined and called as well as what file and line number the call was made on. As soon as new versions come out, you already know what hooks are available.
Thanks for the reply and encouragement.
Your plugin is really a useful tool. Adding a phpMyAdmin interface would be great! Thx a lot.
Thanks for the encouragement DeuceD. I’m glad that you enjoy the plugin.
Adding phpMyAdmin is definitely high up on my list of things I’d like to integrate, but I don’t currently have a timeline of when that would be available.
[...] WP Developer Assistant [...]
Do I Dreaming? It sounds very useful.
I want to suggest to add a log system (may be logging into database table). It would be useful when page redirects and something that you want to see is on the first page. I thought to write log plugin but it would be better to be in your plugin.
Regards,
Emu
Why would a person want all of this stuff. I can hardly keep up with thing the way it is. Maybe somebody has a staff. Hmmmm!
Just a quick comment. Amazing plugin…simply amazing!
[...] If you are a wordpress developer, meaning you use WordPress as a framework for the websites you build, you might want to take a look at the plugin WP Developer Assistant [...]
I’m WP developer and that’s very good that I found your plugin!
I recieve such errors on plugin pages:
tice: Undefined variable: reportingLevel in /var/www/vhosts/developstudio.com/subdomains/reality/httpdocs/wp-content/plugins/wp-developer-assistant/wp-developer-assistant.php on line 1151
Warning: is_file() [function.is-file.php]: open_basedir restriction in effect. File(/var/www/vhosts/developstudio.com/subdomains/reality/httpdocs/..) is not within the allowed path(s): (/var/www/vhosts/developstudio.com/subdomains/reality/httpdocs:/tmp) in /var/www/vhosts/developstudio.com/subdomains/reality/httpdocs/wp-content/plugins/wp-developer-assistant/wp-developer-assistant.php on line 1289
would be nice if i could also do a chmod for given folders/files (multiple at once if possible, and also for al files and subfolders in a given folder), and also if upload/chmod could support upload using FTP name&password for usage on servers with secured PHP
Thanks for the report Tomáš. I’ll look into those errors and see if I can create a new version with a fix.
Interesting ideas. I’ll add them to the list of possible upgrades.
[...] WP Developer Assistant [...]
[...] WP Developer Assistant [...]
[...] WordPress Developer Assistant Plugin→ [...]
Great plugin! Greetings from Ukraine
[...] А ось нещодавно анонсований плагін з красномовною назвою wp-developer-assistant є й справді асистентом кожного “просунутого” користувача платформи WordPress. Тому, якщо ви тільки розпочинаєте перші кроки у чудовомі світі WP - пропустіть цей абзац )) Плагін дає можливість просто-таки перевернути двигунок догори ногами, що має сенс тільки тоді, коли ви знаєте навіщо це вам потрібно. Качайте і читайте документацію отуткаво: http://gaarai.com [...]
[...] WP Developer Assistant [...]
[...] WP Developer Assistant | gaarai.com (tags: wordpress plugin) [...]
[...] WP Developer Assistant WP Developer Assistant is the first WordPress plugin of its kind. It essentially is a toolkit that makes life as a WordPress developer easier. [...]
[...] WordPress Developer Assistant Ever wondered where that action or filter hook gets called, or thought how great it would be if you could output a full listing of PHP gloabl variable values on each page so debugging would be easier? Then, this is for you. WordPress Developer Assistant is a toolkit that makes life as a WordPress developer easier. [...]
[...] Страница плагина WP Developer Assistant [...]
Great Plugin really been looking for a while for something like this..
I have one problem thou, when I try to upload my themes to the themes folder I get a permissions error now how do I change the permissions on the themes folder on the server as I have checked the theme that I am uploading and the permissions are fine. I am able to upload plugins perfectly it’s just with the theme uploading that I have a problem.
Thanks in advance
[...] Страница плагина WP Developer Assistant [...]
[...] de sunucunuzdaki herhangi bir klasöre dosya göndere bilirsiniz. Detaylı açıklamasını burada bulabileceğiniz eklentinin işlevlerine şöyle bir göz atalım. Wordpress ayarlarına direk [...]