How to Fix Yoast SEO llms.txt File Permission Errors on Pantheon Hosting

… Last Updated:

Try to not panic on WordPress File Permission Errors in Pantheon
Mask” by svklimkin is licensed under CC BY-SA 2.0 .

The Problem

If you’re running a WordPress site on Pantheon hosting and using Yoast SEO, you may have encountered this frustrating error:

“Yoast can’t write llms.txt – insufficient filesystem permissions”

This happens because Pantheon’s architecture makes the web root (/) read-only for security reasons. While this is great for site security, it prevents Yoast SEO from creating the llms.txt file that helps AI systems understand and index your content properly.

What is llms.txt?

The llms.txt file is a new SEO feature that provides AI systems (like ChatGPT, Claude, and other LLMs) with structured information about your website’s content. Think of it as a sitemap specifically designed for AI crawlers. When properly configured, it can help:

  • Improve how AI systems understand your content
  • Increase the chances of your content being referenced in AI-generated responses
  • Provide better context for AI-powered search features

Why This Happens on Pantheon

Pantheon uses a unique hosting architecture where:

  • The web root (/) is read-only
  • Only specific directories like /wp-content/uploads/ are writable
  • This prevents plugins from creating files in the standard location

This security feature is actually a good thing – it protects your site from many types of attacks. We just need to work with it, not against it.

The Complete Solution

Here’s the step-by-step fix that works reliably on all Pantheon environments:

Step 1: Create the Directory Structure

First, we need to create a writable location for the llms.txt file.

Using SFTP:

  1. Connect to your Pantheon site via SFTP
  2. Navigate to /wp-content/uploads/
  3. Create a new folder called yoast
  4. Inside the yoast folder, create an empty file named llms.txt

Using a file manager plugin: If you prefer working in WordPress admin:

  1. Install a file manager plugin like “File Manager”
  2. Navigate to /wp-content/uploads/
  3. Create the yoast directory
  4. Create the empty llms.txt file

Step 2: Create the Symlink (Local Development Required)

This step requires command line access and a local development environment or Git workflow.

On your local machine:

bash

# Navigate to your WordPress root directory
cd /path/to/your/wordpress/site

# Create the symlink
ln -s wp-content/uploads/yoast/llms.txt llms.txt

# Add to Git and deploy
git add llms.txt
git commit -m "Add symlink for Yoast llms.txt file on Pantheon"
git push origin master

What this does: The symlink creates a “shortcut” from the root directory (where Yoast expects the file) to the writable uploads directory (where we can actually create it).

Step 3: Add the WordPress Filter

Add this code to your theme’s functions.php file or (better) to a custom plugin:

php

/**
 * Redirect Yoast llms.txt file path to writable location on Pantheon
 */
add_filter( 'wpseo_llmstxt_filesystem_path', function () {
    return WP_CONTENT_DIR . '/uploads/yoast/';
} );

Why this works: This filter tells Yoast SEO to look for and write the llms.txt file in our custom writable location instead of the read-only root directory.

Step 4: Deploy and Activate

  1. Deploy your changes to Pantheon (if using Git workflow)
  2. Go to your WordPress admin → Yoast SEO → Settings → Site features
  3. Toggle the llms.txt feature OFF, then back ON
  4. Save the settings

This forces Yoast to regenerate the file in the new location.

Verification

To confirm everything is working:

  1. Check the file exists: Visit yoursite.com/llms.txt in your browser
  2. Review the content: The file should contain structured information about your site
  3. Monitor for errors: Check that the Yoast error message is gone

Troubleshooting

File not appearing at yoursite.com/llms.txt:

  • Verify the symlink was created correctly
  • Check that you’ve deployed the symlink to Pantheon
  • Confirm the filter code is active

Yoast still showing errors:

  • Toggle the llms.txt feature off and on again
  • Clear any caching (including Pantheon’s Edge Cache)
  • Check file permissions in the uploads directory

Symlink not working:

  • Ensure you’re using relative paths in the symlink
  • Verify your local Git setup is pushing symlinks correctly
  • Check that Pantheon recognizes the symlink after deployment

Alternative Solutions

If you can’t use Git/symlinks:

You can manually upload the file and use WordPress rewrites:

php

// Add to functions.php - redirects llms.txt requests to uploads folder
add_action( 'init', function() {
    add_rewrite_rule( '^llms\.txt$', 'wp-content/uploads/yoast/llms.txt', 'top' );
    flush_rewrite_rules(); // Remove this line after first load
} );

Why This Solution Works

This approach respects Pantheon’s security model while giving Yoast the functionality it needs:

  • Keeps the web root read-only (security maintained)
  • Uses writable uploads directory (file can be updated)
  • Appears at correct URL for AI crawlers
  • Integrates cleanly with Yoast’s workflow

Need Help?

This is exactly the kind of technical WordPress problem I solve regularly for clients. If you’re running into issues with this fix or have other Pantheon-specific WordPress challenges, get in touch for a consultation.

Related Services:


Found this helpful? This tutorial demonstrates the kind of technical WordPress expertise we bring to client projects. For complex WordPress implementations and hosting optimizations, contact Knihter for professional assistance.