Installing WordPress to root directory with existing static site. Concerns?

I’d like to update a simple static HTML site to WordPress. This would be my first WP site and I already have a theme in mind to use. The static HTML site has seven pages and an images sub folder in the root directory.

My current thinking is to install WordPress into the root directory that the current static HTML site resides in, build it in the background and delete the old site(static HTML) when the WP site is ready to go.

I know I’ll have two index files (index.html and index.php), but I believe I can specify the load order in .htaccess or through the site admin panel (need to look into to be sure).

Would there be any concern installing WordPress into the root directory that the current HTML site resides in? I’m trying to avoid having to figure out moving the WP site either from a web subdirectory or locally on my PC(WAMP) to the web root. Just trying to make it as straightforward as possible without risking messing something up when moving it.

Thank you for your time an insights.

Topic installation Wordpress

Category Web


First, Thank you all for taking the time to respond. Second, my apologies for my late response. Since I'm looking to make this as straightforward as possible, I'll either invoke the cPanel domain redirect to point to the WP subfolder or use the Duplicator plugin(that I came across) to move the WP subfolder to the root. Again, Thank you for your insights. Very much appreciated.


You could install Wordpress in a subdirectory and once ready make it appear like it located in the root. Follow the process here :

https://www.websitedesignerinseattle.com/2012/01/making-wordpress-blog-root-directory-keeping-directory/

But I would recommend taking the steps to move it properly and change the corresponding requirements. Moving all files to root, changing site and wordpress URL's and search and replace for all content referencing the demo subfolder. Since you only have 7 pages this should take minutes.

Other things to note , media upload folder may need to be changed and permalinks may need resaving.


When you install WP in the root of an existing site, WP will 'take over', and your existing content will be less accessible (if viewable at all).

Since your WP site is developmental (not ready for prime time), your best bet is to install WP in a subfolder, then develop/tweak the site until it is ready to go live.

When ready to go live, you would need to change the htaccess in the root folder to redirect everything to the subfolder. If you are on a hosting plan, you could also redirect the domain via the domain mapping functions in cPanel.

Having the WP site in a subfolder will allow the current site to be visitable until you are ready to redirect visitors to the WP site.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.