开发者

Best way to keep current non-wordpress site live while implementing new wordpress site?

开发者 https://www.devze.com 2023-02-23 07:00 出处:网络
I am using Wordpress as the CMS for a website I am working on. The company currently has a site that\'s live using basic CSS/HTML. I want to keep that site l开发者_运维技巧ive while being able to full

I am using Wordpress as the CMS for a website I am working on. The company currently has a site that's live using basic CSS/HTML. I want to keep that site l开发者_运维技巧ive while being able to fully test the Wordpress site without interfering with the current live site.

There are several ways I am considering going about this (creating sub-folder on current hosting or getting another domain name for dev etc.) but was wondering what the general consensus considered the best option.


It is very easy. Install wordpress in your root folder and install the "Maintenance Mode" plugin ( http://wordpress.org/extend/plugins/maintenance-mode/ ). After you have wordpress and the plugin installed, make the "Maintenance Mode" active page the home page of your current website.

This will let you login to your wordpress site and still work on it live on your server. When your WP site is ready to go, simply deactivate Maintenance mode and your site will be live! No switching of directories, 301s, etc.


Either will work just fine for quick testing. If you're going to be doing this sort of thing quite often it might be best to set up a development domain so you can have Wordpress already installed.

After you are done with your test site, Wordpress allows you to go to Tools -> Export and export any pages or posts you create, and then you can easily copy and activate your theme and use Tools -> Import to pull in the data on the live version.


I would recommentd using 301 redirect you may use try this all you need to do is define this rule

/ -> your old home page url here

http://wordpress.org/extend/plugins/simple-301-redirects/

You can go to wordpress edit page and click View Page to view it.


The first thing to do is not install in root, as you will run into conflicts with your existing index.html and the WP index.php file. Install in /blog/ or /dev/ and use a plugin like WordPress › Absolute Privacy « WordPress Plugins to block bots, logins, casual viewers and the RSS feed.

When you're done developing, move the site to root, either by moving all core WP files and folders to root, or by making WP appear to be in root while leaving all core files/folders in the instal directory. See Moving WordPress « WordPress Codex.

And then do a 301 redirect from index.html to index.php (or set a default root document for index.php) and also 301 all the old pages you care about to their new WP counterpart.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号