Do I need to disable PHP redirects?
The short answer for most users is:
No. You do not need to disable PHP redirects.
Please let us explain.
The default setting for Yoast SEO Premium is that PHP handles your redirects. This requires no work on your end, except for entering the redirects. If you only have few redirects your server will be able to handle them quickly using PHP redirections.
However, if you have a lot of redirects (exact number depends on your server), they may slow PHP down. In that case it can be useful to let your webserver take care of the redirects.
When you go to Admin -> SEO -> Redirects -> Settings you'll see a toggle to select the type of redirect method you want to use. The default recommend option is 'PHP' but you can change to .htaccess (Apache) or 'Web server' (NGINX).
- Log in to your WordPress website.
When you’re logged in, you will be in your ‘Dashboard’.
- Click on ‘SEO’.
On the left-hand side, you will see a menu. In that menu, click on ‘SEO’.
- Click on ‘Redirects’.
The ‘SEO’ settings will expand providing you additional options. Click on ‘Redirects’.
- Click on the 'Settings' tab.
- Select the redirect method of your choice.
PHP: This is the default option and works with most server configuration.
.htaccess: This option writes directly to your server. On some Apache servers, your webhost may recommend writing directly to this file. Optionally, you can write to a separate .htaccess file.
Web Server: This option primarily appears for non-Apache servers like NGINX.
- Click 'Save Changes'.