Stop xmlrpc.php Attacks

Summary: how to diagnose and eliminate the xmlrpc.php WordPress exploit when it’s clobbering your web server. You’ve been running a public Ubuntu 12+ and Apache/LAMP web server for a while now. Until recently everything has worked fine, but suddenly your server is struggling to display even static pages. Sometimes content takes forever to load, and […]

Loading

Read More

Installing Drush 8

Previously I discussed how to install Drush 6.x for use with Drupal 7. Here we’ll install Drush 8 for Drupal 8, specifically using Ubuntu 16.04 Server. The recommended method is to install using PHP’s Composer. First we install Composer itself: Then, install unzip to speed things up: Installing and Testing Drush 8 Install Drush 8.x: […]

Loading

Read More

Drupal 7: Display Page Elements Conditionally

In Drupal you often need to show page elements conditionally, usually based on variables like the URL or user identity. Fortunately, the Drupal API offers several functions that can help: hook_html_head_alter() template_preprocess_page() template_preprocess_html() drupal_match_path() drupal_get_http_header() user_is_logged_in() or user_is_anonymous() Modify the Page Header To add a tag to the header on every page, use hook_html_head_alter() in […]

Loading

Read More