Learning Center
How to Add llms.txt to WordPress
Already created your llms.txt file? Here's how to upload it to your WordPress site so AI assistants can find it at yoursite.com/llms.txt.
Option 1 (Easiest)
Upload via File Manager or FTP
This is the most reliable method. You're simply placing a text file in the main folder of your website — the same folder where WordPress itself lives.
Log Into Your Hosting Account
Go to your hosting provider (GoDaddy, Bluehost, SiteGround, etc.) and find the "File Manager" tool. It's usually in your hosting dashboard or cPanel.
Navigate to Your Root Folder
Find the folder called "public_html" or "www" — this is where your website files live. You should see files like wp-config.php and folders like wp-content in there.
Upload Your llms.txt File
Click "Upload" and select your llms.txt file. Make sure the filename is exactly "llms.txt" (all lowercase, no spaces). It should end up in the same folder as wp-config.php.
Test It
Open your browser and go to yoursite.com/llms.txt — you should see your text file contents. If you get a 404 error, the file might be in the wrong folder.
Option 2 (No Hosting Access)
Use a WordPress Plugin
If you don't have access to your hosting file manager, you can use a plugin to serve the file. This is less ideal but works.
Plugin Method Steps
- Install a plugin like "WPCode" (free) that lets you add custom code snippets
- Create a new snippet that registers a custom route at /llms.txt
- Paste your llms.txt content into the snippet so it outputs as plain text
- Alternatively, search for "llms.txt" in the WordPress plugin directory — dedicated plugins are starting to appear
What Your Developer Would Add (WPCode Snippet)
If you have a developer, they can add this small code snippet to serve your file:
add_action('init', function() {
if ($_SERVER['REQUEST_URI'] === '/llms.txt') {
header('Content-Type: text/plain');
echo file_get_contents(
ABSPATH . 'llms.txt'
);
exit;
}
});Troubleshooting
Common Issues
If It's Not Working
- Getting a 404? — Your file is probably in the wrong folder. It needs to be in the root (same level as wp-config.php), not inside wp-content
- Seeing HTML instead of plain text? — WordPress might be intercepting the URL. Try the plugin method above, or add a rewrite rule
- File shows but looks garbled? — Make sure you saved it as plain text (.txt), not as a Word document or rich text
- Using a subfolder install? — If WordPress is in a subfolder (yoursite.com/blog/), put llms.txt in the main public_html folder, not the blog subfolder