Symptoms
- On a WordPress website hosted on a Plesk for Linux server, pagination buttons in WordPress Admin dashboard do not work as expected.
- HTTP/3 is enabled.
- PHP handler on the domain is set as FPM application served by nginx in the menu Domains > example.com > PHP.
- When WordPress debug mode enabled, the following PHP warning appears on the website:
PHP Warning: Undefined array key "HTTP_HOST" in /var/www/vhosts/example.com/httpdocs/wp/wp-admin/includes/misc.php
Cause
nginx processing the variable HTTP_HOST differently when serving HTTP/3 requests:
https://trac.nginx.org/nginx/ticket/2281
Resolution
- Connect to the server via SSH.
- Create or edit file
/etc/nginx/fastcgi.confand add the following configuration to it:fastcgi_param HTTP_HOST $host;
- Restart nginx to apply the changes:
# service nginx restart