shortlist-digital/wp-big-friendly-redirector-plugin

Wordpress plugin to dump redirects to json

Installs: 3 555

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 4

Forks: 0

Type:wordpress-muplugin

2.1.0 2018-07-31 13:20 UTC

README

WordPress plugin to manage large number of redirects within Tapesty.

Big Friendly Redirector

Wordpress mu plugin to generate redirects into a redirect.json file.

Important

This plugin works with /category_name/post-title-with-dashes/post_id permalink format. If for some reason you decide to change that, you will also change the redirect final result.

Quick code overview

The plugin has Sources (where to get redirects from) and Destinations (where to save the redirects.json file)

  • You can find the Sources in app/Source folder
  • You can find the Destionations in app/Destination folder

The main plugin file app/Cron.php will pick all the redirects from sources and save in the destionation. The destination is defined via the environment variable BFR_SAVING_TO_AWS.

Wordpress cron usage

The plugin adds a daily cron usage to add new redirects automatically. You can verify this by running vendor/bin/wp cron event list in the root wordpress folder.

save_post Hook

The plugin automatically fires a new cron update when a redirects is added/changed in the redirect manager.