Sitemap error when using PHP8

Hello @jackyliao,

Thank you for contacting support.

That error comes from a constant that should be defined by WordPress by default but on your website is not being defined.

There are 2 ways to fix this issue:

  1. You can define the constant FS_CHMOD_FILE in your wp-config.php file.
  2. You can disable the caching from the sitemap by using the following filter:

Hope this helps solve your issues.

Don’t hesitate to get in touch if you have any other questions.


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer