Using Drush to Check Site Status

Share this post

We recently discussed how you can use Drush to maintain modules on your site. You can also use Drush to learn important configuration information, or discover errors that have been logged, without ever having to sign in to the admin side of a site.  Here are a few commands you can type to gain information about the site you are currently working on.

drush @alias status

In the above command, @alias is not needed, but why not take advantage of the aliases we set up earlier? Without the @alias Drush will attempt to guess what site you are working on. If the site is a Drupal multi-site, you will have to make your current working directory the multi-site you desire. If nothing is given it will default to ‘default’. The status command will provide information about your Drupal installation, and some Drush configuration information as well.

Instead of logging into the admin side of a site to check the status report, save yourself a few steps by running the check from the command line.

drush rq

The command line also allows for easy manipulation of data to get exactly the information you are looking for. This is a handy tool when you need to check the overall configuration status of a site. A lot of information is released, helping to determine what, if any, work needs to be done.

Drupal keeps a log called ‘Watchdog’ in order to track everything happening on a site. This log can contain some critical information. And, yes, this can also be accessed via Drush.

drush ws

By default this will display the last 10 messages logged, but like all the other commands there is a bank of arguments and flags available to tailor the output to exactly what is needed. Keep in mind the database logging modules must be enabled in order for Watchdog to record events.

Although there are nice tools that help expedite certain tasks, sometimes you still need to log in in to the admin side. This could be as easy as adding /user to the address bar. However, if you are a web developer with many clients, it makes more sense to use the command the nice guys who made Drush wrote:

drush uli

This prints a link that can be used to log in as the admin user as a one-time authentication. If you are working locally, this will even open a browser to the specified URL.

The beauty of Drush is that many of these commands can be used with the Site Aliases that we created. That way without ever having to change a directory, you can check up on, and maintain all of your clients.

Next time I will go over ways to automate the syncing of environments using Drush.

Insights

Helping B2B leaders use technology to drive business

2026 B2B Content Marketing Trends

2026 B2B Content Marketing Trends

What Mid-Market Leaders Need to Do Right Now Over the past year, my team and I have been doing something that’s become surprisingly rare in digital business: meeting face-to-face with our clients. Whether it's healthcare technology, B2B manufacturing, nonprofits, or...

The Cost of Not Doing Anything

The Cost of Not Doing Anything

Why B2B and Nonprofits Should Invest in Their Websites and Portals In today’s digital first world, a website or customer portal isn’t just a “nice to have” ,  it’s the foundation of your organization’s success. Yet, many B2B companies and nonprofits fall into the trap...

A Guide To The Difference Between GEO, AIO and SEO

A Guide To The Difference Between GEO, AIO and SEO

For years, we built websites to earn authority with search engines.  Recent research outlines how AI summaries replacing traditional search results and are having a tremendous negative effect on website traffic.  Since SEO is no longer driving customers to your site,...