Easy way to serve both a WordPress and a static/php website at the same time?

Hi there peers! Anyone around who knows an easy approach to serve both a WordPress and a static/php website at the same time?

I’ve just created a WP website with EE command ee site create mydomain.com --wpfc , but I’m not aware about any easy methods to accomplish it. While I’m still working on the content for my WordPress website, I’d like to display a HTML landing page.

I know there are a few maintenance mode WP plugins out there, but if I use them I wouldn’t be able to serve my static html landing page.

In order to serve a static website while still having wordpress installed, I’ve tweaked my website’s conf file under /etc/nginx/sites-enabled/ so when I want to serve a static website, I just comment out the included conf files related to WordPress and point the website root to another directory such as public_html.

This solves the problem of serving a static website, but it also locks me out of my wordpress website.

Any ideas?

Thanks in advance.

I think the easier solution is to create two separate sites - one for static files (temp landing page), and the other one for Wordpress (development version) . Point your main domain to landing page, and make a subdomain (e.g. dev.mydomain.com) and install Wordpress on it.

You should be able to create a static html pages(s). Place them in your htdocs folder. Make sure the primary page is index.html.

In your nginx sites-available you will want to edit the following line: index index.php index.html index.htm;

to

index index.html index.php index.htm;

This will cause nginx to look for the static website first. You can still access the wordpress with the domain-name.tld/index.php

I’ve found out an answer for another topic here on rtCommunity that better suits my needs. I’m leaving the link as reference in case anyone else’s interested.

Accessing “non-Wordpress” directory in website root