Redirection, a WordPress plugin, manages URL address redirections for your WordPress blog. For some users, the plugin’s export function may not work. A solution for fixing this issue is given here, so that you can properly export your list of redirects to CSV, XML, Apache, or RSS formats.
At the time of this post, this solution works for the current version of Redirection, version 2.2.13.
Problem: Cannot Export Redirects List for Redirection Plugin
Normally, to export your redirects list from the Redirection plugin, you would go to the Redirection plugin settings page. Then in the Modules section, you would select the format you want to export your redirects list (CSV, XML, Apache, RSS).
Clicking on the format should allow you to save the exported file to your computer. But for some users, clicking on the format only brings you to the main redirects list, and doesn’t allow you to export the list.
Solution: Edit “Redirection” Plugin File To Fix Export
In your blog’s WordPress admin section, go to the plugin editor. For “select plugin to edit“, choose “Redirection“.
In “redirection.php“, change line 201 from this:
function inject() {
$options = $this->get_options();if ( isset($_GET[‘token’] ) && isset( $_GET[‘page’] ) && isset( $_GET[‘sub’] ) && $_GET[‘token’] == $options[‘token’] && $_GET[‘page’] == ‘tools.php?page=redirection.php’ && in_array( $_GET[‘sub’], array( ‘rss’, ‘xml’, ‘csv’, ‘apache’ ) ) ) {
…
}
To this:
function inject() {
$options = $this->get_options();if ( isset($_GET[‘token’] ) && isset( $_GET[‘page’] ) && isset( $_GET[‘sub’] ) && $_GET[‘token’] == $options[‘token’] && $_GET[‘page’] == ‘redirection.php’ && in_array( $_GET[‘sub’], array( ‘rss’, ‘xml’, ‘csv’, ‘apache’ ) ) ) {
…
}
Specifically, the highlighted part in bold text above, needs to be changed to read: ‘redirection.php’
Click “update file” to save the changes. Now, if you try to export your redirects list from the Redirection plugin settings, then it should ask you where to save the file.
Alternatives To Redirection WordPress Plugin
Here are some alternative WordPress plugins that can handle permanent 301 redirects for your WordPress blog: