Copy or move index.php?
-
I have an old website done in HTML, inhabiting the root directory. I have created a WordPress version of the site in a subdirectory, and am following the instructions to allow WordPress to power the site’s root.
In the “Giving WordPress Its Own Directory” document, under the sub-heading “Using a pre-existing subdirectory install”, the direction is given to “Copy (NOT MOVE!)” the index.php and .htaccess files from the WordPress directory to the root directory.
While researching this process, I came across more than one site that instructed the exact opposite, “move, not copy” the index.php file.
My question has several parts:
Could someone please explain the reasoning behind why or why not to copy or move the index.php file from the WP folder to the root?
The index.php file now in the root needs to be modified to point back to the WP subfolder with require(‘./wordpress/wp-blog-header.php’); If the index.php file is left in the WP subfolder, will it not conflict with the index.php in the root? (I’ve read also about the Silence is Golden version of the index.php file that can be left in the WP subfolder, further confusing the issue of whether or not to move or copy, in the first place)
If I can do this move successfully, I assume that I will need to do some 301 redirects in the .htaccess file for the old HTML pages. Do I also do this for the old index.html? Can I delete all the old HTML files from the root afterward?
Thanks so much for any clarification offered.
- The topic ‘Copy or move index.php?’ is closed to new replies.