I recommend handling the 301 redirect in your web server rather than in WordPress. mod_rewrite or RedirectMatch will be much more efficient than spinning up WordPress to deliver a Location
: header.
<VirtualHost *:80>
ServerName busted-cheap-url.com
# mod_alias
RedirectMatch permanent (.*) http://great-new-url.com$1
# OR mod_rewrite
RewriteEngine on
RewriteRule (.*) http://great-new-url.com$1 [R=301]
</VirtualHost>
There are several methods for changing the blog URL; I tend to prefer setting a new WP_HOME
and WP_SITEURL
in wp-config.php
as a quick fix, and running SQL commands in the database as a more permanent solution.
See also:
- Changing The Site URL
- Easily Move a WordPress Install from Development to Production?, which recommends several ways to move a blog to a new URL
Related Posts:
- Migrating WordPress – New domain entry, links broken
- How do I copy files I downloaded from the wayback machine to my new site?
- How do I get WooCommerce to automatically recreate pages? [closed]
- How can I sync WordPress plugin settings between environments?
- InDesign to WordPress workflow
- Send email when a new post is published [closed]
- insert data in database table from plugin with WP3.1
- Library plugin for WordPress [closed]
- Markdown in WordPress 3.2?
- Integrating Google Maps with custom marker and hover?
- Auto-post to multiple sites like Posterous? [closed]
- Network-Wide Plugin Settings Management
- Subscribe2 Configuration
- Plugin to restrict login and unpublish content from an author
- A reliable AdSense plugin. Does it exist? [closed]
- Is there a good plugin for social bookmarking on site for WordPress [closed]
- Automagic Link Shortening for Non-Hosted WP
- plugin suggestion for barcode
- How to restrict an entire WordPress site to visitors, but the register and login page?
- Is it possible to integrate WordPress *posts* and social media (Facebook, Google+, Twitter)? [closed]
- Is there a plugin that makes extnernal links open in new window, BUT [closed]
- Good website screenshot plugin [closed]
- I need to have two 1-5 star rating fields, only editable by admins. Which plugin should I use?
- WordPress shopping cart that supports 2 tier product variation options
- Can’t see login page after migration
- Let user subscribe to specific categories
- Is there a way to alter the order in which the plugins appear in the page?
- How to get a Jewish/English event calendar on a page in WordPress?
- Simple plugin for showing RSS subscription links?
- Front End Plugin for User Management [closed]
- Is it possible to use WordPress as an online portfolio for text content? What kind of theme would I look for?
- Woocommerce plugin for minimum order and add-to-card-step
- WordPress Settings Lost After Site Migration
- Information and Videos for Customers in the Backend [closed]
- How can I get automatically anchors for every h2-heading?
- How would I go about creating a user ranked post popularity page?
- Multiple instances of nivo slider plugin
- What plugin should I use for booking events and receiving payments? [closed]
- Custom Plugin – Package and Deployment Solutions
- WordPress comments not appearing in blog posts, likely because of Redux template. Could I fix this with a plugin that adds a comment form as a block? [closed]
- LinkedIn Social Wall | Is there a plug-in (Free / Paid) to display a LinkedIn feed in a social wall (not just a feed)?
- Trying to create a private area custom for each user where they upload images to a server [closed]
- Migrating hosts, 500 errors and plugin issues
- What is most efficient way to migrate wordpress website?
- Migrating to WordPress Recipe Plugin and Some SQL Issues
- Migrating problem from Joomla to WP
- Multiple domains issue
- Plugin to create forms using HTML [closed]
- Is there a premium plugin for appointment reservation? [closed]
- Create a plugin from within WordPress
- Limit the amount of words displayed by the Latest News plugin, or recommend an alternative [closed]
- How can i create a newsletter for my wp blog? [closed]
- Need a wordpress plugin to show tutorial difficulty [closed]
- Plugin to hide image in excerpt
- Allow customers to download updated versions of software
- How to deploy gutenberg on my own [closed]
- Can I use Symfony components in a plugin that I want to submit to the WordPress plugin repository?
- Migrating Asp.Net site to WordPress site
- Short messages widget [closed]
- breadcrumb need to show all pages and subpages
- Free paypal cart solution [closed]
- How to import WordPress site to new WordPress site?
- How to notify wordpress instalation about my plugin update?
- How do I convert my WordPress website to be domain agnostic?
- How to use existing hook in twentytwelve to all theme of wordpress?
- Mass Mail Plugin to Email Specified User Roles [closed]
- WordPress Membership Plugin Advice [closed]
- Using Amazon Book Gallery Plugins in WordPress [closed]
- How to get Facebook comment plugin in blog? [closed]
- Add posts from other WordPress blog to the current one
- Specific plugin for custom user information access? [closed]
- Plug-in that shows x number thumbnails from another post
- Plugin to create unlimited custom shortcodes?
- Is there any plugin to show number of clicks on the link?
- WordPress plugins – “Update” in backend vs replacing all files with never version
- Issues With Exporting & Importing Oxygen Builder Site
- Create survey that redirects to sidebar menu customized to answers
- Image paths wrong after migrating with wp-migrate-db-pro media files add-on
- Scheduled emails to include only posts and calendar events for the upcoming week
- Custom content per post in widget
- Database error when user logs in
- Manually updating plugins via FTP or SCM
- E-commerce-like solution [closed]
- is ther a plugin that will hide/show content for a scheduled period of time? [closed]
- Automatically send an email to list when blog is updated
- Display Facebook photo albums and photo comments?
- Can Shopp Commercial Plugin be hacked to display radio buttons instead of Dropdowns? [closed]
- Duplicator live to wamp https to http
- wordpress Search function is not working
- booking form with availability calendar [closed]
- Simple Amazon Affiliate Plugin [closed]
- WordPress Plugin for Maps of specific Tweets? [closed]
- Social network plugins for WordPress [closed]
- Need a Plugin to create a registration form for my website? [closed]
- Helpdesk solution which is not form based
- Slider Plugins for header [closed]
- registration plugin [closed]
- how to make wordpress remember my choice
- I’m getting the following error: Fatal error: Uncaught Error: Call to undefined function oil_paint_regeneration() [closed]
- How to trigger plugin migration code when plugin updates?