Mobile app version of vmapp.org
Login or Join
Courtney195

: Developing a new site over an existing site. How do I do this with WordPress? Let's say I have an ecommerce site that is already up and functioning, www.widgets.com but I don't like the shopping

@Courtney195

Posted in: #Ecommerce #WebHosting #Wordpress

Let's say I have an ecommerce site that is already up and functioning, widgets.com but I don't like the shopping cart that I got with the host and instead want to use Wordpress and a Wordpress shopping cart plugin. I don't want the site that is up to come down but I would like to develop the Wordpress site on the same host account and same domain.

Is that possible?

Once the Wordpress site is all developed, how do I make it the root site?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Courtney195

2 Comments

Sorted by latest first Latest Oldest Best

 

@Murray432

This is an annoyingly complex process!


Create the site under a sub directory or subdomain.
When you're ready to go live use the htaccess code at the bottom of this post to redirect everyone but you to a maintenance page (replace the ip address with your own).
Backup and then delete the existing site code from the root directory.
Move the wordpress codebase into your root directory.
Access your database via phpMyadmin or similar tool.
Find the wp_options table, browse the contents for the siteurl field and update it to the new url.
Now login to Wordpress, and change your permalinks setting to one of the other options, save it, then change it back to the original setting (this regenerates your wordpress htaccess settings).
Use a link scanner tool, like XENU's link sleuth, to scan the site for any urls which point to the dev site and manually update them.
Remove the maintenance page redirect code and you're good to go.


Done. It's a total pain the the backside, and the last step is down to the fact that wordpress auto generates absolute urls inside posts and pages on first save. You can go back after a save and change the urls to relative ones or search the database in phpMyAdmin to amend them, but the technique outlined above is safer and more reliable (bitter experience).

As @Drai says you can redirect from root to a subdirectory, but don't do it unless you really need to. Depending on the config you choose you can end up with Wordpress's self generated links to pointing the subdomain or directory all redirecting back via the root. This is a nightmare when you are trying to do permanent redirects to keep your pagerank in one piece during a migration phase and can screw up your analytics (you become your own referrer).

RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_HOST} !^1.1.1.1
RewriteCond %{REQUEST_URI} !/temporary-offline.html$
RewriteRule .* /temporary-offline.html [R=302,L]

10% popularity Vote Up Vote Down


 

@Pierce454

It is actually very easy to load Wordpress from a subdirectory as the main site. You can install it at root/directoryname, protect that area while developing and then point the site there whe it is ready. The instructions are very clear in the WordPress Codex

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme