WordPress Page Redirection: A Comprehensive Guide
WordPress CMS has gained immense popularity for its user-friendliness, customization features, and versatility. From managing personal blogs to e-commerce websites, WordPress has become the go-to solution for individuals and businesses worldwide. One of the most significant benefits of WordPress is its ability to create and manage static pages. In this article, we’ll discuss how to redirect a WordPress page to another website and explore why it’s a useful feature.
Why Redirect a WordPress Page To Another Website?
Redirecting a WordPress page to another website can come in handy for several reasons:
- If you’ve newly created or moved your content to a new website, redirecting pages is crucial to ensure that visitors find your content easily without having to search for it.
- Redirect your page to another website if you’ve written an article about a product or service that is no longer available on your current site but is available on another site.
- If you’re modifying the URL structure of your site, you should redirect the old URL to your new URL to ensure visitors can access your content without any issues.
Methods to Redirect a WordPress Page to Another Website
Here are a few methods to make a WordPress page redirect to another website:
Method 1: Using Redirect Plugins
You can use plugins to redirect WordPress pages to other sites. Here are some popular plugins:
Redirection is well-known and available in the WordPress repository. It’s easy to manage 301 redirects and keep track of 404 errors. By using this plugin, creating a redirect from a WordPress page to another website is effortless.
b) Quick Page/Post Redirect Plugin
This popular plugin allows you to redirect any page or post to another location quickly. In addition, you can create an optional rewrite rule to redirect the old URL to a new one.
c) Simple 301 Redirects
Simple 301 Redirects removes the need for modifying your .htaccess file by providing a plugin that makes creating 301 and 302 redirects easy.
Method 2: Editing WordPress Editor
If you avoid using plugins, you can edit your WordPress page directly in the editor. Here is how to do it:
- Login to your WordPress dashboard
- Navigate to ‘Pages’ and select the page you want to redirect
- Click ‘Edit’ to open the WordPress editor
- In the editor, locate the ‘Page Attributes’ meta box on the right-hand side of the page
- Under ‘Page Attributes,’ locate the ‘Parent’ drop-down menu and select ‘Custom.’
- In the ‘Custom’ field, enter the URL of the new website you want to redirect the page to.
- Click ‘Update’ to save changes
Method 3: Editing WordPress Functions.php File
If you have some knowledge of PHP and WordPress, you can edit your website’s functions.php file to create a redirect. Follow these steps:
- Login to your WordPress dashboard
- Navigate to ‘Appearance,’ then select ‘Theme Editor.’
- Select the ‘functions.php’ file from the list of files on the right-hand side.
- Add the following code snippet at the bottom of the file:
- Don’t forget to replace ID with the ID of the page you want to redirect and ‘https://new-website.com’ with the URL of the new website.
- Click ‘Update File’ to save changes.
wp_redirect( ‘https://new-website.com’, 301 );
Redirecting a WordPress page to another website is useful for various reasons, including changing URLs, updating content, and creating a better user experience for visitors. Depending on your level of comfort with plugins or coding, choose the method that suits you best. We hope this guide was helpful in understanding how to redirect a WordPress page to another website.