Skip to content

Activating LightStart corrupts show_on_front option, breaking front-page.php template loading #564

Description

@poonam279

When LightStart is activated (or maintenance mode is enabled and later disabled), the show_on_front option in wp_options is changed from posts to page, but page_on_front remains 0. This puts WordPress into a broken in-between state where front-page.php no longer loads, and the homepage falls through to index.php showing unstyled posts.

The issue persists after:

  • Disabling maintenance mode
  • Deactivating the plugin
  • Rolling back to a previous plugin version
  • Clearing browser cache / testing logged-out

Steps to reproduce

  1. Set up a WordPress site with a theme that uses a front-page.php template.
  2. Go to Settings → Reading and set the homepage display to "Your latest posts".
  3. Confirm the homepage loads correctly via front-page.php.
  4. Install and activate LightStart.
  5. Enable maintenance mode
  6. Do some normal work (edit a post or two).
  7. Then disable it.
  8. Visit the homepage.
    Expected: Homepage renders using front-page.php.
    Actual: Homepage shows unstyled posts via index.php.

Root cause

Querying the database confirms the corruption:

SELECT option_name, option_value FROM wp_options
WHERE option_name IN ('show_on_front', 'page_on_front');
option_name option_value
show_on_front page
page_on_front 0

show_on_front has been flipped to page, but no page is assigned (page_on_front = 0). WordPress then evaluates is_home() as true but is_front_page() as false, so the template hierarchy skips front-page.php entirely and falls through to index.php.

The likely cause is that LightStart's maintenance-mode logic sets show_on_front to page (to serve its own landing page) but does not restore the original value on deactivation or when maintenance mode is toggled off.

Workaround

Running this query restores the homepage:

UPDATE wp_options SET option_value = 'posts' WHERE option_name = 'show_on_front';

https://wordpress.org/support/topic/lightstart-activation-preventing-front-page-php-from-loading/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    customer reportIndicates the request came from a customer.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions