I am hoping to replace a legacy website composed of hundreds of HTML files, with a WordPress installation. Right now the existing HTML files are not movable due to the number of links there are receiving from 15 years of existing. I want to install the new site into a subdirectory, but have the website rewrite any calls to the base directory to the subdirectory.
More specifically, currently the website is located at
www.domain.com is linked to the
public_html/ base folder. Any directorys within the
public_html folder is reflected in the URL link (ie.
www.domain.com/folder/file.tye). After installing the new website, I need the files that are linked to continue holding their file paths.
I plan on installing this new WordPress installation in the
public_html/wp/ folder. I would like the
public_html/wp/ folder to reflect the
www.domain.com/. How would I do this in a way that the old links are not disrupted (as long as there are no overlapping URLS)?
1 Reply to “Best solution for installing WP into a legacy …”
As long as there are no overlapping URLs, WordPress' built-in canonicalization will enable you to use
domain.com as the WP/site root (instead of using the install directory at
/wp/). In the WP Admin, visit Settings > General, and specify the "WordPress Address" (i.e., the one that includes
/wp/), and then also the "Site Address" (i.e., the root domain). Once that's done, WP will handle all of the rewriting automatically.