When you develop scenes or pluginsit can be helpful to have WordPresstell you what is going on and whensomething is not working right.To make this possible, there are a handful of pluginsthat you can choose to installin your site for debugging purposes.All of these plugins have been bundled intoone super plugin called Developer.Now, Developer is quite an unusual plugin.So, let me show you how it works.First, we go to the back-end of our WordPress site.Go to "Plugins" and "Add New".And, from here simply search for "Developer".And the first one you get, the one from Automatic,is the one you want to install.
When you activate the Developer plugin,you get this pop-up that asks you,what kind of development you are going to be doing?Are you developing a plugin?A theme for a self-hosted WordPress installation?Or, a theme for WordPress.com VIP?So, in our case we are building a theme fora self-hosted WordPress installation. Save changes.
And now the plugin will give you along list of other plugins that it wants to install for you.And this is the whole purpose of the Developer plugin.Developer, is actually a plugin thatprompts you to install a long list of other pluginsso you don't have to source them out, one at a time.
These are all optional and you canchoose to install them or not.And you can also choose to install them later on.I will not go into great detail about thedifferent Developer plugins in this course,but they are worth installing and experimenting withas you progress through the course.And there are a couple that we're going toinstall right away.So, at the top here, we are going to install "Debug Bar".So, I will click install. Scrolling down,we are going to install "Monster Widget".Which, we are going to use later on in the course.We'll also use "Regenerate Thumbnails".And finally, "Theme Check".
Now, like I said, you can choose to installany of the other ones, if you want to,but for now let's leave it at these.Now I can click on "Get developing".And I'm just taken back to the plugin page.But, the Developer plugin hasadded a new feature to my site.So, if I go to "Tools", you will seeyou have a new option called Developer.And when you go to Developer you will seethe same settings as before, only in a different display.So here at the top we can choose the project types.So,we are at "Theme for self-hosted WordPress installation".Then, you see all the plugins.
So here you see the Active ones and the Inactive ones.And at the bottom, you have some other information.Here, it says that " We recommend you set the followingconstants to true in your wp-config.php file.""WP_DEBUG" and "SAVEQUERIES".Then, under settings it recommendsthe following settings or configurations,which is "Pretty Permalinks", but this is nowset by default in WordPress.So, you don't really have to do anything about it.And finally, you have a link to the Codex.And a link to the underscore starter theme.Which, we are going to be working with.
So, before we wrap up this movie,I'm going to do that one thing we haven't done yet.Which is set up these Constants,or in particular, this one "WP_DEBUG".You see right now WordPress is set to not debug itself.So will never get errors if there are any errors.To fix that we have to go intoone of the configuration files in WordPress,in particular this one wp-config.php.To do all of this you need some form of code editor.I'm going to use Atom for this.This is the only time I will use Atom.But, it is currently my preferred simple code editor.
So, I will go to "File". Open the file.Then navigate to my Word Press installationand find "wp-config.php. " I'll open the file.And here you see this is the file thatsets up WordPress to communicate with a database.So here I have database name, the username and password,and local host and of that other stuff.And if I scroll all the way to the bottom here,we find " define( 'WP_DEBUG', false) "And this is what I need to change.I'll change that to true. Save the file.
Go back and reload this Developer page.And now you see that WP_DEBUG is set.Now like I said, this is all we need for this course.So, you can also try to set SAVEQUERIESto true if you want to, if you want to seewhat's happening with the database queries.But, that is beyond the scope of this course.Now, what's actually happened when weinstalled all of these plugins within Developer,is we've gotten new features in WordPress.So if we run to the front end of the site,you will see up here in the tool bar we now have a Debug Barthat gives us information about what's going on in the site.We also have a direct link to Developerthat takes us back to the Developer page.
And, as we move forward you'll seesome of the other features we've installed.Having these Developer plugins installed canhelp you quickly identify and fix problemsin your theme as you are developing it.My advice to you is to start with the key onesI pointed out during the install process.And then more later on if you want a morein depth analysis and more information.