Trapias
Trapias

Reputation: 94

How to restore default homepage?

I'm new to Drupal, and cannot understand how to do this: I must have accidentally deleted the default home page in my test site, and cannot find a way to restore it.

I see I can create a new basic page and set it as my new home, however this is missing something - for example it does not show latest articles with the "main page content" system block, even if I set this new page as the homepage in site settings.

Should I do something more to let Drupal know this is actually an homepage? And isn't there a way to restore the original default home page? If I delete the custom page and let the default home empty in site settings I'm now sent to the login page, or to my user profile if I'm logged-in.

Thanks for any help, al.

Upvotes: 1

Views: 3784

Answers (2)

tulvit
tulvit

Reputation: 651

The default front page in Drupal 8 is actually not a page (a node) but a View.

Please, check out if Views and Views UI modules are enabled (Manage/Extend from admin menu).

If both of them enabled, then inspect all your current Views (Manage/Structure/Views). There should be one with a name "Frontpage".

If this "Frontpage" View exists and enabled, then set Default front page to /node in your site's settings (Manage/Configuration/Basic sites settings).

If this "Frontpage" View exists but disabled, then enable it.

If this "Frontpage" View does not exist, then you've probably deleted it and have 3 options to restore it:

  1. Create a new View which would work just as default original "Frontpage" View that have been deleted. You can create a new test site and just use its settings as a reference ("Frontpage" View will be available after a clean "standard" install).
  2. If you did not create any new Views or modify existing, then the best choice will be just unistalling/installing Views/Views UI modules. It will refresh all settings (i. e. all custom Views or settings will be missed, all default predefined Views will be restored).
  3. Not recommended. You can create a new Drupal fresh site, make Drupal believe that this new install is actually a copy of your current site, and then you can just export/import this "Frontpage" View from new install to your current site using core module "Configuration Manager". More on this: https://drupal.stackexchange.com/a/150609

Upvotes: 9

Kristofer Sanders
Kristofer Sanders

Reputation: 58

To set new frontpage from you node Administration -> configuration -> system

Front-Page -> Default front page and set path to you page....

Upvotes: 0

Related Questions