# Maintenance Tools Guide

**Last Updated:** 2026-01-10

Guide to automated maintenance tools for internal linking system.

## Available Tools

### 1. Link Health Checker

**Script:** `v2/scripts/blog/link-health-check.php`

**Purpose:** Checks for broken links and link health issues.

**Usage:**

```bash
php v2/scripts/blog/link-health-check.php
```

**Output:**

- `docs/content/blog/link-health-log.json` - Detailed health check results
- Console output with summary

**When to Run:**

- Weekly or monthly
- After major content updates
- Before deploying changes

### 2. Link Validation

**Script:** `v2/scripts/blog/validate-all-links.py`

**Purpose:** Comprehensive link validation including anchor text quality.

**Usage:**

```bash
python3 v2/scripts/blog/validate-all-links.py
```

**Output:**

- `docs/data/blog-link-validation.json` - Validation results
- `docs/content/blog/LINK_VALIDATION_REPORT.md` - Markdown report

**When to Run:**

- Monthly
- After adding new links
- Before major SEO audits

### 3. New Link Suggestions

**Script:** `v2/scripts/blog/suggest-new-links.php`

**Purpose:** Analyzes content and suggests new internal links.

**Usage:**

```bash
php v2/scripts/blog/suggest-new-links.php
```

**Output:**

- `docs/data/blog-new-link-suggestions.json` - Link suggestions

**When to Run:**

- When adding new posts
- When updating existing content
- Monthly review

### 4. SEO/AEO/GEO Audit

**Script:** `v2/scripts/blog/audit-seo-practices.py`

**Purpose:** Audits internal linking for SEO/AEO/GEO best practices.

**Usage:**

```bash
python3 v2/scripts/blog/audit-seo-practices.py
```

**Output:**

- `docs/content/blog/seo-aeo-geo-audit.json` - Audit results
- `docs/content/blog/SEO_AEO_GEO_AUDIT.md` - Markdown report

**When to Run:**

- Quarterly
- After major link updates
- Before SEO campaigns

### 5. Cluster Validation

**Script:** `v2/scripts/blog/validate-clusters.py`

**Purpose:** Validates cluster linking structure.

**Usage:**

```bash
python3 v2/scripts/blog/validate-clusters.py
```

**Output:**

- `docs/content/blog/cluster-validation.json` - Validation results
- `docs/content/blog/CLUSTER_VALIDATION_REPORT.md` - Markdown report

**When to Run:**

- Monthly
- After cluster updates
- When adding new clusters

### 6. Comprehensive Audit Report

**Script:** `v2/scripts/blog/link-audit-report.php`

**Purpose:** Generates comprehensive audit report combining all data sources.

**Usage:**

```bash
php v2/scripts/blog/link-audit-report.php
```

**Output:**

- `docs/content/blog/COMPREHENSIVE_LINK_AUDIT.md` - Combined audit report

**When to Run:**

- Monthly
- Before stakeholder reviews
- After major updates

## Maintenance Schedule

### Daily

- None (automated monitoring if implemented)

### Weekly

- Link health check (`link-health-check.php`)

### Monthly

- Link validation (`validate-all-links.py`)
- Cluster validation (`validate-clusters.py`)
- Comprehensive audit (`link-audit-report.php`)

### Quarterly

- SEO/AEO/GEO audit (`audit-seo-practices.py`)
- Review and update documentation

### As Needed

- New link suggestions (`suggest-new-links.php`)
- When adding/updating content

## Automated Reporting

### Setting Up Cron Jobs

**Weekly Health Check:**

```cron
0 9 * * 1 cd /path/to/landingpage && php v2/scripts/blog/link-health-check.php >> logs/link-health.log 2>&1
```

**Monthly Validation:**

```cron
0 9 1 * * cd /path/to/landingpage && python3 v2/scripts/blog/validate-all-links.py >> logs/link-validation.log 2>&1
```

## Interpreting Results

### Link Health Check

- **0 broken links:** ✅ Good
- **1-5 broken links:** ⚠️ Review and fix
- **>5 broken links:** ❌ Critical - fix immediately

### Link Validation

- **Anchor text variety >0.7:** ✅ Good
- **Anchor text variety 0.5-0.7:** ⚠️ Needs improvement
- **Anchor text variety <0.5:** ❌ Critical - over-optimization risk

### SEO Audit

- **Hub coverage >80%:** ✅ Good
- **Hub coverage 50-80%:** ⚠️ Needs improvement
- **Hub coverage <50%:** ❌ Critical - missing pillar links

## Troubleshooting

### Common Issues

**Issue:** Script fails with "file not found"

- **Solution:** Check file paths and ensure data files exist

**Issue:** Validation shows false positives

- **Solution:** Review validation logic, may need to adjust thresholds

**Issue:** Suggestions are not relevant

- **Solution:** Review keyword mapping and adjust as needed

## Related Documentation

- [Internal Linking Guide](./INTERNAL_LINKING_GUIDE.md)
- [New Post Linking Checklist](./NEW_POST_LINKING_CHECKLIST.md)
- [Update Post Linking Guide](./UPDATE_POST_LINKING_GUIDE.md)
