Hide all pages except landing page

I’d go with a similar approach as @Buttered_Toast:

  • Create a template for a specific page (see template hierarchy, especially single page) and set this one as the home page. This then is your “landing page”. Do not forget to remove all references to wp_head, wp_footer, etc.
  • Add a condition into the header for all other pages/posts that checks for is_user_logged_in() and do a wp_redirect() to the home page, if the user is not logged in. This is a nicer solution than a message or a 404, IMHO.

This way you can easily continue working, but the landing page will be there.


Sidenote: I would NOT recommend to develop on a site that is publicly available. All your debug messages will be exposed. Create a development environment (if nothing else, take a subfolder and lock it with htpasswd), develop there, and if you are ready, migrate everything to the production system.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)