Complete Documentation

Everything you need to know about AIRanky - from installation to advanced customization with hooks, filters, and REST API.

Installation

AIRanky can be installed automatically through the WordPress admin or manually uploaded to your server.

Automatic Installation (Recommended)

  1. Go to Plugins > Add New in your WordPress admin
  2. Search for "AIRanky"
  3. Click Install Now and then Activate

Manual Installation

  1. Download the plugin zip file
  2. Go to Plugins > Add New > Upload Plugin in your WordPress admin
  3. Choose the downloaded file and click Install Now
  4. Click Activate Plugin
Requirements
  • WordPress: 6.0 or higher
  • PHP: 7.4 or higher
  • Memory: 64MB minimum
  • Storage: 5MB for plugin files

Getting Started

After installation, follow these steps to set up AIRanky for your website.

Initial Setup

  1. Navigate to AIRanky Dashboard - Go to the AIRanky menu in your WordPress admin
  2. Generate Your Files - Click the generation buttons to create your AI-optimized files
  3. Configure Settings - Customize post types, update frequency, and AI bot rules
  4. Monitor & Maintain - Use the Tools page to validate files and view activity logs

Generated Files

AIRanky creates three main files for AI optimization:

  • sitemap-ai.xml - AI-optimized sitemap with metadata
  • llms.txt - Structured content index for AI training
  • robots.txt - Safe AI bot access management

Configuration

Customize AIRanky settings to match your website's needs and preferences.

Sitemap AI Settings

Available Options
  • Post Types: Select which content types to include
  • Update Frequency: Daily, weekly, or monthly regeneration
  • Priority Settings: Set content priority levels
  • Custom Metadata: Add AI-specific content descriptions

LLMS.txt Configuration

Configure structured content organization for AI models:

  • Category and tag grouping
  • Content type definitions
  • Custom metadata fields
  • AI model compatibility settings

Robots.txt Management

Safe AI bot access configuration:

  • AI bot user-agent rules
  • Path allow/disallow settings
  • Safe marker system for non-conflicting rules
  • Automatic cleanup on deactivation

REST API Reference

AIRanky provides REST API endpoints for programmatic access to sitemap generation, file management, and status monitoring.

Available Endpoints

GET /wp-json/airanky/v1/sitemap

Retrieve the current sitemap-ai.xml content

Example Request
GET /wp-json/airanky/v1/sitemap

GET /wp-json/airanky/v1/llms

Retrieve the current llms.txt content

Example Request
GET /wp-json/airanky/v1/llms

POST /wp-json/airanky/v1/regenerate

Trigger file regeneration

Example Request
POST /wp-json/airanky/v1/regenerate

GET /wp-json/airanky/v1/status

Get current plugin status and file information

Example Request
GET /wp-json/airanky/v1/status

Hooks & Filters

AIRanky provides extensive hooks and filters for developers to customize functionality.

Available Filters

airanky_sitemap_content

Modify sitemap content before generation

Example Usage
add_filter('airanky_sitemap_content', function($content) {
    // Modify sitemap content
    return $modified_content;
});

airanky_llms_content

Modify llms.txt content before generation

Example Usage
add_filter('airanky_llms_content', function($content) {
    // Modify llms.txt content
    return $modified_content;
});

airanky_robots_rules

Modify robots.txt rules before generation

Example Usage
add_filter('airanky_robots_rules', function($rules) {
    // Modify robots.txt rules
    return $modified_rules;
});

airanky_post_types

Filter which post types to include

Example Usage
add_filter('airanky_post_types', function($post_types) {
    // Add or remove post types
    return $post_types;
});

airanky_exclude_posts

Exclude specific posts from AI files

Example Usage
add_filter('airanky_exclude_posts', function($excluded_posts) {
    // Add posts to exclude
    $excluded_posts[] = 123; // Post ID
    return $excluded_posts;
});

Code Examples

Practical examples of how to use AIRanky hooks and filters in your themes and plugins.

Custom Sitemap Content

Add Custom Content to Sitemap
add_filter('airanky_sitemap_content', function($content) {
    // Add custom pages to sitemap
    $custom_pages = [
        'about' => [
            'url' => home_url('/about/'),
            'lastmod' => date('Y-m-d'),
            'priority' => '0.8',
            'changefreq' => 'monthly'
        ]
    ];
    
    foreach ($custom_pages as $page) {
        $content .= "<url>\n";
        $content .= "    <loc>{$page['url']}</loc>\n";
        $content .= "    <lastmod>{$page['lastmod']}</lastmod>\n";
        $content .= "    <priority>{$page['priority']}</priority>\n";
        $content .= "    <changefreq>{$page['changefreq']}</changefreq>\n";
        $content .= "</url>\n";
    }
    
    return $content;
});

Custom LLMS.txt Content

Add Custom Sections to LLMS.txt
add_filter('airanky_llms_content', function($content) {
    // Add custom content sections
    $custom_sections = [
        'Custom Resources' => [
            'description' => 'Additional resources for AI training',
            'urls' => [
                home_url('/api/docs/'),
                home_url('/data-sets/'),
                home_url('/research/')
            ]
        ]
    ];
    
    foreach ($custom_sections as $title => $section) {
        $content .= "\n## {$title}\n";
        $content .= "{$section['description']}\n\n";
        foreach ($section['urls'] as $url) {
            $content .= "- {$url}\n";
        }
    }
    
    return $content;
});

Custom Robots.txt Rules

Add Custom AI Bot Rules
add_filter('airanky_robots_rules', function($rules) {
    // Add custom AI bot rules
    $custom_rules = [
        'User-agent: CustomAIBot',
        'Allow: /public-content/',
        'Disallow: /private-content/',
        'Crawl-delay: 1'
    ];
    
    $rules = array_merge($rules, $custom_rules);
    return $rules;
});

Troubleshooting

Common issues and their solutions when using AIRanky.

Common Issues

Files Not Generating

Possible causes:

  • Insufficient file permissions
  • WordPress cron not working
  • Memory limit too low

Solutions:

  • Check file permissions (755 for directories, 644 for files)
  • Verify WordPress cron is working
  • Increase PHP memory limit to 128MB or higher

Conflicts with Other SEO Plugins

Solution: AIRanky is designed to work alongside other SEO plugins. If conflicts occur:

  • Check for duplicate robots.txt rules
  • Verify sitemap URLs don't conflict
  • Contact support if issues persist

Performance Issues

Solutions:

  • Enable caching for generated files
  • Reduce update frequency for large sites
  • Exclude unnecessary post types
  • Use background processing for file generation

Debug Mode

Enable debug mode to get detailed information about file generation:

Enable Debug Mode
// Add to wp-config.php
define('AIRANKY_DEBUG', true);

Need More Help?

Can't find what you're looking for? Our support team is here to help