How to I serve the static HTML file at the root directory in a wordpress site?

I needed the same thing – a ‘landing’ page at the root site that was custom-built (via PHP), but then WordPress-based pages elsewhere.

I did it with the htaccess file for the site:

# For example.com root, set landing.php as the default page
RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$ [NC]
RewriteRule ^$ /landing.php [L]

This will redirect www.example.com to www.example.com/landing.php . All other pages will use the normal WP htaccess rules (positioned after the above directives).

I also have these directive above to force HTTPS:

# Force all requests to use HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

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