Skip to content

Commit

Permalink
mu-plugins: Add redirects for Advanced Admin handbook pages (#60)
Browse files Browse the repository at this point in the history
* mu-plugins: Add redirects for Advanced Admin handbook pages

* Update redirects

* Add remaining URLs from google doc

Co-authored-by: javiercasares <[email protected]>

---------

Co-authored-by: javiercasares <[email protected]>
  • Loading branch information
ryelle and javiercasares authored Jan 17, 2024
1 parent 1c44af1 commit 8b4dfa3
Showing 1 changed file with 61 additions and 2 deletions.
63 changes: 61 additions & 2 deletions source/wp-content/mu-plugins/site-documentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,67 @@ function redirect_old_content() {
'/documentation/category/customizing/' => '/documentation/customization/',
'/documentation/category/basic-usage/' => '/documentation/support-guides/',

// @todo When the Advanced Administration handbook is updated, add those redirects here.
'/documentation/article/how-to-install-wordpress/' => 'https://developer.wordpress.org/advanced-administration/before-install/howto-install/',
// Redirect articles to Advanced Administration handbook on devhub.
'/documentation/article/administration-over-ssl/' => 'https://developer.wordpress.org/advanced-administration/security/https/',
'/documentation/article/backing-up-your-database/' => 'https://developer.wordpress.org/advanced-administration/security/backup/database/',
'/documentation/article/backing-up-your-wordpress-files/' => 'https://developer.wordpress.org/advanced-administration/security/backup/files/',
'/documentation/article/before-you-create-a-network/' => 'https://developer.wordpress.org/advanced-administration/multisite/prepare-network/',
'/documentation/article/before-you-install/' => 'https://developer.wordpress.org/advanced-administration/before-install/',
'/documentation/article/brute-force-attacks/' => 'https://developer.wordpress.org/advanced-administration/security/brute-force/',
'/documentation/article/changing-file-permissions/' => 'https://developer.wordpress.org/advanced-administration/server/file-permissions/',
'/documentation/article/changing-the-site-url/' => 'https://developer.wordpress.org/advanced-administration/upgrade/migrating/',
'/documentation/article/common-wordpress-errors/' => 'https://developer.wordpress.org/advanced-administration/wordpress/common-errors/',
'/documentation/article/configuring-automatic-background-updates/' => 'https://developer.wordpress.org/advanced-administration/upgrade/upgrading/',
'/documentation/article/configuring-wildcard-subdomains/' => 'https://developer.wordpress.org/advanced-administration/server/subdomains-wildcard/',
'/documentation/article/cookies/' => 'https://developer.wordpress.org/advanced-administration/wordpress/cookies/',
'/documentation/article/create-a-network/' => 'https://developer.wordpress.org/advanced-administration/multisite/create-network/',
'/documentation/article/creating-database-for-wordpress/' => 'https://developer.wordpress.org/advanced-administration/before-install/creating-database/',
'/documentation/article/css/' => 'https://developer.wordpress.org/advanced-administration/wordpress/css/',
'/documentation/article/debugging-a-wordpress-network/' => 'https://developer.wordpress.org/advanced-administration/debug/debug-network/',
'/documentation/article/debugging-in-wordpress/' => 'https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/',
'/documentation/article/editing-files/' => 'https://developer.wordpress.org/advanced-administration/wordpress/edit-files/',
'/documentation/article/embeds/' => 'https://developer.wordpress.org/advanced-administration/wordpress/oembed/',
'/documentation/article/emptying-a-database-table/' => 'https://developer.wordpress.org/advanced-administration/server/empty-database/',
'/documentation/article/faq-troubleshooting-2/' => 'https://developer.wordpress.org/advanced-administration/resources/faq/',
'/documentation/article/finding-server-info/' => 'https://developer.wordpress.org/advanced-administration/server/server-info/',
'/documentation/article/ftp-clients/' => 'https://developer.wordpress.org/advanced-administration/upgrade/ftp/',
'/documentation/article/giving-wordpress-its-own-directory/' => 'https://developer.wordpress.org/advanced-administration/server/wordpress-in-directory/',
'/documentation/article/hardening-wordpress/' => 'https://developer.wordpress.org/advanced-administration/security/hardening/',
'/documentation/article/how-to-install-wordpress/' => 'https://developer.wordpress.org/advanced-administration/before-install/howto-install/',
'/documentation/article/htaccess/' => 'https://developer.wordpress.org/advanced-administration/server/web-server/httpd/',
'/documentation/article/importing-content/' => 'https://developer.wordpress.org/advanced-administration/wordpress/import/',
'/documentation/article/installing-multiple-blogs/' => 'https://developer.wordpress.org/advanced-administration/before-install/multiple-instances/',
'/documentation/article/installing-wordpress-at-popular-hosting-companies/' => 'https://developer.wordpress.org/advanced-administration/before-install/popular-providers/',
'/documentation/article/installing-wordpress-in-your-language/' => 'https://developer.wordpress.org/advanced-administration/before-install/in-your-language/',
'/documentation/article/installing-wordpress-on-your-own-computer/' => 'https://developer.wordpress.org/advanced-administration/before-install/development/',
'/documentation/article/loopbacks/' => 'https://developer.wordpress.org/advanced-administration/wordpress/loopback/',
'/documentation/article/migrating-multiple-blogs-into-wordpress-multisite/' => 'https://developer.wordpress.org/advanced-administration/multisite/sites-multisite/',
'/documentation/article/moving-wordpress/' => 'https://developer.wordpress.org/advanced-administration/upgrade/migrating/',
'/documentation/article/multilingual-wordpress/' => 'https://developer.wordpress.org/advanced-administration/wordpress/multilingual/',
'/documentation/article/multisite-network-administration/' => 'https://developer.wordpress.org/advanced-administration/multisite/administration/',
'/documentation/article/must-use-plugins/' => 'https://developer.wordpress.org/advanced-administration/plugins/mu-plugins/',
'/documentation/article/network-admin-settings-screen/' => 'https://developer.wordpress.org/advanced-administration/multisite/admin/settings/',
'/documentation/article/network-admin-sites-screen/' => 'https://developer.wordpress.org/advanced-administration/multisite/admin/',
'/documentation/article/network-admin-updates-screen/' => 'https://developer.wordpress.org/advanced-administration/multisite/admin/',
'/documentation/article/network-admin/' => 'https://developer.wordpress.org/advanced-administration/multisite/admin/',
'/documentation/article/nginx/' => 'https://developer.wordpress.org/advanced-administration/server/web-server/nginx/',
'/documentation/article/optimization-caching/' => 'https://developer.wordpress.org/advanced-administration/performance/cache/',
'/documentation/article/optimization/' => 'https://developer.wordpress.org/advanced-administration/performance/optimization/',
'/documentation/article/phpmyadmin/' => 'https://developer.wordpress.org/advanced-administration/upgrade/phpmyadmin/',
'/documentation/article/plugins-editor-screen/' => 'https://developer.wordpress.org/advanced-administration/plugins/editor-screen/',
'/documentation/article/post-formats/' => 'https://developer.wordpress.org/advanced-administration/wordpress/post-formats/',
'/documentation/article/restoring-your-database-from-backup/' => 'https://developer.wordpress.org/advanced-administration/security/backup/',
'/documentation/article/running-a-development-copy-of-wordpress/' => 'https://developer.wordpress.org/advanced-administration/before-install/development/',
'/documentation/article/test-driving-wordpress/' => 'https://developer.wordpress.org/advanced-administration/debug/test-driving/',
'/documentation/article/two-step-authentication/' => 'https://developer.wordpress.org/advanced-administration/security/mfa/',
'/documentation/article/update-services/' => 'https://developer.wordpress.org/advanced-administration/wordpress/update-services/',
'/documentation/article/upgrading-wordpress-extended-instructions/' => 'https://developer.wordpress.org/advanced-administration/upgrade/upgrading/',
'/documentation/article/using-cpanel/' => 'https://developer.wordpress.org/advanced-administration/server/control-panel/',
'/documentation/article/using-filezilla/' => 'https://developer.wordpress.org/advanced-administration/upgrade/ftp/filezilla/',
'/documentation/article/using-your-browser-to-diagnose-javascript-errors/' => 'https://developer.wordpress.org/advanced-administration/debug/debug-javascript/',
'/documentation/article/why-should-i-use-https/' => 'https://developer.wordpress.org/advanced-administration/security/https/',
'/documentation/article/wordpress-backups/' => 'https://developer.wordpress.org/advanced-administration/security/backup/',
'/documentation/article/wordpress-multisite-domain-mapping/' => 'https://developer.wordpress.org/advanced-administration/multisite/domain-mapping/',
];

$request_uri = $_SERVER['REQUEST_URI'] ?? '/documentation/'; // phpcs:ignore
Expand Down

0 comments on commit 8b4dfa3

Please sign in to comment.