LLMS.txt not generated due to ABSPATH in certain Hosts
-
Hello!
I found that on hosting environments where ABSPATH points to a read-only directory (such as WordPress.com and Pressable), the llms.txt file isn’t generated.
On these platforms, ABSPATH resolves to a system directory that contains only the WordPress core files and doesn’t allow write operations. As a result, AIOSEO can’t create llms.txt or llms-full.txt, and the “Generate” button in the LLMS settings stays greyed out.
Using dirname(WP_CONTENT_DIR) instead of ABSPATH fixes the issue, since it points to a writable path.
Could this be reviewed for a future update? It likely affects other managed hosts with similar setups. We reported a similar issue to Yoast, and they promptly fixed it in a later release, so hopefully AIOSEO can apply the same improvement here. Reference -> https://wordpress.org/support/topic/llms-txt-file-not-being-created-on-wordpress-com-hosted-sites/
As a workaround, we applied some code changes directly in the plugin file and it worked, but I believe it would be best to have this handled natively in the plugin instead of using a custom patch:
all-in-one-seo-pack-pro/app/Common/Llms/Llms.phpSome knowledge base references:
- https://pressable.com/knowledgebase/abspath-and-pressable/
- https://wordpress.com/support/plugins/incompatible-plugins/#using-abspath-read-on
Thanks!
You must be logged in to reply to this topic.