How to change from html site to Wordpress site when you have subdomains?
March 29, 2019 12:54 PM   Subscribe

I want to update an old site to Wordpress. It has a few subdomains that I don't want to screw up. The subdomains are sitting in the public_html folder along with the actual website. It's kind of a mess in there and I don't know what to do.

I have a website that is old and in html, called www.alligator.com. I have three other subdomains that are www.bear.com, www.canary.com, and www.doggies.com. They sit in the www.aligator.com/public_html folder. As do all the .html pages of www.alligator.com. They two are WP sites, one is .html.

I want to update the www.alligator.com (main site) to WP as well.

My cpanel leads me to Softaculous to install, but says it can't do it because there is an .htaccess file already there. I don't see one. And I don't know if there are separate ones for each subdomain. there is an access-logs file from 2013 (I don't really know what any of this means...)

Twenty years ago I could figure all this out. Now I'm scared to experiment, as I don't understand any of it.

Question: How do I install Wordpress on the main domain without losing/borking my other sites as simple and easily as possible?

I'm hosted by MacHighway.

(I'm already ok with having to manually migrate the 20 year old .html stuff manually)

Thank you.
posted by Vaike to Computers & Internet (4 answers total) 1 user marked this as a favorite
 
Just for clarity, those aren't "subdomains" in industry parlance. Those are domain domains. Subdomains are: "florida.alligator.com" . Nitpick, sorry.

Assuming I understand your setup correctly, what I would do is create another /public_html/directory and install WP there. Get what you need to do to get it set up. And then use your cPanel to remap www.aligator.com to that new directory.

Happy to follow up.
posted by humboldt32 at 2:19 PM on March 29, 2019 [4 favorites]


.htaccess is a hidden file; you might need to take extra steps to see it in whatever you are viewing the directory with. For WordPress purposes, this is what tells the server to examine the friendly URL and route it into the WP software, instead of trying to find a static HTML page with that filename. Each folder can have it own .htaccess that applies to it (and any folder underneath, unless it has its own with directives that override the inherited ones). Every WP install should have its own since it is semi-specific to that site's configuration.

humboldt32's suggestion to just make another subfolder, install WP there, and adjust the settings for that domain to use the new one as its document root is probably the best bet; especially since .htaccess rules are inherited from parent folders - you don't want one site accidently picking up settings from another, and that might be why the installer is balking at loading a new WP somewhere that might affect other installs under it. (The other possibility is the host has it set up such that it only considers installing at the top level for a single site, in which case they'd have to help you resolve the problem, which is likely to come with an upsell to cover multiple sites. Did you use their tool to install the other WP sites? If so, you should be good there.)

One gotcha is that WP is not really keen on these things changing after it is set up, so you are better off getting the folders and domain configured first, and then installing WP - but that means the old "alligator" site will be down until you finish setting up the replacement. You can create the folder and install WP while leaving the old site up, and then wait to change the domain settings until it's ready to go live, but you may have to poke at the WP database to get all the locations lined back up again afterwards.
posted by CyberSlug Labs at 3:14 PM on March 29, 2019


Response by poster: Thank you.

For clarity: Create the directory in the public_html/ that is there now?

Also, thank you for being nitpicky. I see that two of the sites are both within and without the public_html and show up in the cpanel as subdomain and add-on domain, both.

Is it possible to move the other domains out of the public_html to make it less confusing?
posted by Vaike at 3:15 PM on March 29, 2019


Best answer: I was assuming you were working with a typical apache server setup where your webspace is the "/public_html/" directory. And then sub-directories for the various websites.

"/public_html/bear.com/" etc.

Usually up from /public_html/ is unavailable for webaccess. /bin/ and /cgi/ etc. live there. So I don't think you can move the other domains out. It's all semantics though. It's no less confusing.

I'm not sure what you mean by both within and without.

Again, what I would do is use your cPanel to set up a new website. I assume that ends up in the directory "/public_html/new_alligator.com/". Get your replacement WP version of www.alligator.com dialed in. and then use cPanel to remap the "www.alligator.com" domain to the new website.

Once you're done with that, you'll be safe to copy whatever's in "/public_html/" (minus the domain folders) to and archive and then delete them all.
posted by humboldt32 at 7:56 PM on March 29, 2019 [2 favorites]


« Older Going on safari - should I get a GoPro?   |   Changing from grandparenting mindset to parenting... Newer »
This thread is closed to new comments.