I'm very new to modifying WordPress, so please explain things in great detail (I've seen a large number of posts which simply contain PHP code, but they never say which file this code should be in, for instance, or how this code is called by WordPress)
I tried to install the wp-phpMyAdmin plugin for WordPress, however whenever I try to run an SQL query I get redirected to a 404 page. I've stepped through the code to try and determine exactly when I am changing from phpMyAdmin to the 404 error and I have discovered that up until template_loader.php everything seems to be running well. After template_loader.php is called (and before the include($template) line) the variable $template is pointing to a 404 page.
Reading through as much code as I could, I've determined that do_action('template_redirect') is changing $wp_query->is_404 to true. Although I have been unable to figure out exactly what template_redirect does to figure out why this is happening. The WordPress Codex merely says:
template_redirect
Runs before the determination of the template file to be used to display the requested page.
And you can't even click on template_redirect to figure out where this action is getting linked to a function. Any help would be appreciated.