Skip to content

A Working Drupal Site Suddenly Says “Welcome to your new Drupal website”

  • by

On one of the Drupal websites that our partner King Kabuz Media runs, Exercise and Mind, recently had an issue.

It’s a Drupal website that has lots of content, and has worked for quite some time now, but suddenly when a non-authenticated user goes to the home page, they get the default “Welcome to your new Drupal website” page. For me this caused mild panic, for I have put countless hours building content for the site, and always fear being hacked and all my things erased.

First off, as a good site admin, you should make sure that the website has a backup done. Depending on what type of website you have, whether it uses tables or structures within a database, or whether it’s just plain code and pictures for a site the backup will be different, but everything should be backed up. Of course, I think all Drupal sites require a database to be utilized, which is where almost all of the data gets stored for your site.

Now, according to Drupal’s documentation there are a few things to check first:

  • Check admin/user/permissions. Do anonymous users have ‘access content’ permission?
  • Do you really have some nodes promoted to the front page? Check admin/content/node/overview. In the filter section, select “status” and “promoted”. Are there any nodes in the list?
  • Do you have the “Organic groups access control” module enabled? If so, open the “Groups” section of the node’s Edit page. If any of the “Audience” items are checked, make sure the “Public” checkbox is also checked. Otherwise, that node won’t be visible to anyone outside of that audience (and users with ‘administer nodes’ permission).
  • Have you set the front page path on the settings page (admin/settings/site-information “Default front page”) to something other than “node”?
  • Did you uninstall an access module* without disabling it properly?
  • Did you try rebuilding permissions? Go to admin/content/node-settings and click “Rebuild permissions”.

If all this fails, send the following SQL queries to your database:

USE databasename TRUNCATE node_access; INSERT INTO node_access (nid, gid, realm, grant_view, grant_update, grant_delete) VALUES (0, 0, 'all', 1, 0, 0);

These commands break down as follows:

USE databasename

This command means that you are going to be sending commands to the database databasename

TRUNCATE node_access;

From this, we truncate the node_access table, which essentially clears it for the rebuild of all the values we shall soon do.

INSERT INTO node_access (nid, gid, realm, grant_view, grant_update, grant_delete) VALUES (0, 0, 'all', 1, 0, 0);

This then rebuilds the table that we have just cleared with the values as shown, which should return your website access rules to normal!

Good luck! Please let me know if you’ve found any other solutions.

Leave a Reply

Your email address will not be published. Required fields are marked *

eighteen − 3 =