0

I had a WordPress site which was moved to a directory called "test". Now, all the urls for the wordpress site is domain.com/test, /test/wp-admin. The main index page is a custom html page for domain.com. Now, I want to move the WP back to the root directory but let the domain.com point to the same custom html page. How can I achieve this? The custom html page is independent of the theme used in the WP site.

Thanks

1

Put the code from the index.html page into a file called front-page.php and put that in your theme directory.

0

You could use wp_redirect

 <?php wp_redirect( 'http://www.example.com/your-page/', 301 ); exit; ?>
0

Easiest thing you can do is make it a anyname.php and wrap this tagline in it.

<?php Template Name: Index ?>

<html>elements within it</html> 

In WordPress go to any page you create and choose template name: Index.

From WordPress go to Settings > Reading and choose the custom page you want. This will avoid bad seo practises and keep you using your html page dynamically.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.