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?
- Is there a plugin that provides a stackoverflow style editor for wordpress? [closed]
- Who are the most trusted plugin developers? [closed]
- Open Source Forum for wordpress similar to stackexchange or stackoverflow [closed]
- How do I get WooCommerce to automatically recreate pages? [closed]
- Recommended eCommerce Plugin for a T-Shirt Sales Business? [closed]
- How can I sync WordPress plugin settings between environments?
- Is there a good plugin for an online booking system..? [closed]
- InDesign to WordPress workflow
- Send email when a new post is published [closed]
- Membership / subscription plugins – alternatives [closed]
- insert data in database table from plugin with WP3.1
- How Does WordPress Uninclude/Deactivate A Plugin?
- Content generator for development site [closed]
- Email Notifications of new posts to users – suggestions [closed]
- How to override normal WordPress search in Buddypress? [closed]
- 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]
- How to install Google Analytics onto site without internet access
- creating a plug in that would tap into save/update action of posts [closed]
- Fullscreen gallery plugin [closed]
- Short messages widget [closed]
- I want to know about the plugins that help in while I write code on my Page? [closed]
- Is there a plugin for feedback like Kissmetrics available? [closed]
- Hotel reservation plugin you would recommend [closed]
- Mask and Track Outbound Links
- Is there a plugin to turn comments into structured reviews [closed]
- breadcrumb need to show all pages and subpages
- Tools for styling code snippet in a web page
- Moving to a WordPress blog. What do I need to know?
- Free paypal cart solution [closed]
- How to import WordPress site to new WordPress site?
- How to notify wordpress instalation about my plugin update?
- Can I clone plugin folder to another directory so that I don’t have to reinstall them?
- site url is not working after migrtaion in worpress, all links are broken
- How do I convert my WordPress website to be domain agnostic?
- Possible?? Pull Plugin Property Data to a Theme’s Custom Post Type
- Mowing site to another domain in simplest way
- How to completely hide a WordPress/BuddyPress Install? [closed]
- WordPress as heavily personalized content management portal, and somewhat like dropbox [closed]
- 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]
- Displaying number of drafts in Posts section of admin sidebar [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]
- Dynamic Rating Plugin to Add Anywhere
- Plug-in that shows x number thumbnails from another post
- Plugin to create unlimited custom shortcodes?
- A plugin popularity data inside “install new plugin” [closed]
- How to get Recent Post From Each Category with Thumbnail?
- Managing media by folder
- Adding custom Field To The Posts Listing
- Is there any plugin to show number of clicks on the link?
- Automatic recurring payment using YITH subscription and Dokan Stripe
- Elementor Sidebar not loading when PRO elements plugin is active
- how can we migrate wordpress 5.9 website from aws ec2 to new installed wp 5.9 oci compute
- WordPress plugins – “Update” in backend vs replacing all files with never version
- Personality quiz in wordpress using a plugin
- Access remote SFTP server via WordPress login?
- Moving all wordpress posts from 50 websites to another website
- Issues With Exporting & Importing Oxygen Builder Site
- How to update all in-site redirect URLs to destination URLs at once
- Import 2000 posts from one website to another
- Create survey that redirects to sidebar menu customized to answers
- Unable to download backup file created using All in One WP Migration WordPress plugin
- Forum creation with bbpress and front end
- Migrations for plugins, page and theme: looking for a good approach
- How to put a maximum real-time users limit
- Plugin to manage form submissions on admin panel
- Admin Custom Login loses settings on Code and Data migration
- Image paths wrong after migrating with wp-migrate-db-pro media files add-on
- Unable to import complete data remote wp-cli wordpress
- Scheduled emails to include only posts and calendar events for the upcoming week
- Multi-site error wordpress after migration
- Custom content per post in widget
- Database error when user logs in
- Team member plugin problem after changing to another hosting
- How to create a dashboard for logged-in users with custom functionality? [closed]
- Manually updating plugins via FTP or SCM
- Posted posts scheduling to unhide for new members
- How set role at registration based on email?
- E-commerce-like solution [closed]
- WordPress internationalization + domains
- is ther a plugin that will hide/show content for a scheduled period of time? [closed]
- Any plugins that upload, resize, and display images? [closed]
- Using Taxonomies with Vote It Up plugin chart [closed]
- phpBB 3 to bbPress
- Can someone please help me find a solution to my youtube embed problems? [duplicate]
- Automatically send an email to list when blog is updated
- Plugin with custom domain
- Making a particular kind of search engine with WordPress?
- Allow users to enter and edit data in one-to-many configuration
- Pulling RSS from site and display it in posts
- Display Facebook photo albums and photo comments?