WordPress Pagespeed Optimierung

Eigentlich unterscheidet sich die WordPress (WP) Optimierung nicht groß von meinem anderen Speed-Artikel, durch Plugins und bestimmte standardisierte Verfahren kann die Verbesserung der Ladezeiten jedoch viel Systematischer angegangen werden als bei einer Selbstgebauten Webseiten.

Übersicht Speed Audit

  • Was ist Geschwindigkeit?
    – Google Web Vitals with Jon Müller Video
    – Google SEO Mythen Video
    – Website Boosting
    – Video WP Speed + Cache
  • Aufgaben
    – Images 30% oder mehr einer Seite (WebpageTest Chart)
    – Server Setup: Server Alter (Web Dev TTFB), Cache, Plugins, remove Old Plugins, WP 5.5 Lazy Loading, PHP 7.4 speed, Static Cahing.
    – Implementierung: Schau dir mit BuiltWith was alles auf der Seite benutzt wird.
  • Google Sheets: Screaming Frog Export (SC), Prüfe den Speed Report vom Screaming Frog, Erstelle eine Einfach Liste einmaliger Aufgaben. Bilder größen, Grundlagen erklären (2x Stockfotos ist nicht notwendig).
  • Analyse & Analytics: Mobile Daten (für wen bauen wir), Auflösungsdaten.

Upsell zum SEO Audit. 2 Tipps inklusive. Erklären dass ich dabei unterstütze.

htaccess Pagespeed Angaben für Caching

In der htaccess Datei auf dem Webserver sollten Cachign Angaben gemacht werden damit der Pagespeed wert optimiert wird. Die meisten Webseiten für Unternehmen ändern sich nach dem Relaunch kaum noch, daher macht es Sinn den Wert zu optimieren. Ganz besonders wenn sich ein potentieller Kunde mehr als eine Unterseite anschaut und das Angebot entdecken will.

Wie gebe ich das Caching an?

Wer das WordPress SEO Plugin Yoast oder Rank-math verwendet, kann dort direkt die .htaccess Datei editieren. Ein Zugang oder bearbeiten über FTP ist nicht notwendig:

# For Lighthouse Message. Use efficient cache lifetimes Est savings of 695 KiB - AJM 7oct2025
# https://developer.chrome.com/docs/lighthouse/performance/uses-long-cache-ttl
# https://gtmetrix.com/serve-static-assets-with-an-efficient-cache-policy.html
<IfModule mod_expires.c>
  ExpiresActive On

 # Images
  ExpiresByType image/jpeg "access plus 1 year"
  ExpiresByType image/gif "access plus 1 year"
  ExpiresByType image/png "access plus 1 year"
  ExpiresByType image/webp "access plus 1 year"
  ExpiresByType image/svg+xml "access plus 1 year"
  ExpiresByType image/x-icon "access plus 1 year"

  # Video
  ExpiresByType video/webm "access plus 1 year"
  ExpiresByType video/mp4 "access plus 1 year"
  ExpiresByType video/mpeg "access plus 1 year"

  # Fonts
  ExpiresByType font/ttf "access plus 1 year"
  ExpiresByType font/otf "access plus 1 year"
  ExpiresByType font/woff "access plus 1 year"
  ExpiresByType font/woff2 "access plus 1 year"
  ExpiresByType application/font-woff "access plus 1 year"
  ExpiresByType application/font-woff2 "access plus 1 year"

  # CSS, JavaScript
  ExpiresByType text/css "access plus 1 year"
  ExpiresByType text/javascript "access plus 1 year"
  ExpiresByType application/javascript "access plus 1 year"

  # Others
  ExpiresByType application/pdf "access plus 1 year"
  ExpiresByType image/vnd.microsoft.icon "access plus 1 year"
</IfModule>

robots.txt Datei statisch anlegen

In der standard Einstellung von WordPress wird die robots.txt Datei jedes mal dynamisch erzeugt. Wenn man überlegt, dass Bots von Suchmaschinen und SEO-Tools mehr als tausend mal am Tag auf die Seite zugreifen, ist das sehr viel unnötig verbrauchte Rechenleistung die nicht mehr zur verfügung steht um die Seiten für Besucher auszuliefern.

Wie lege ich die robots.txt Datei an?

Wer Yoast oder Rank-Math benutzt kann dort direkt die robots.txt Datei anlegen. Dabei handelt sich um eine simple Text-Datei mit Anweisungen für Bots und Suchmaschinen.
NB: Spam-Bots, Hacker und Webseiten-Viren halten sich nicht an die robots.txt (das wäre als ob man ein Schild an die Tür klebt, bitte nicht einbrechen).

# START YOAST BLOCK
# ---------------------------
User-agent: *
Disallow: /wp-json/
Disallow: /?rest_route=

# ---------------------------
# END YOAST BLOCK

## Block not used bots and SEO Bots from USA that respect robots.txt

User-agent: BLEXBot
Disallow: /

User-agent: dotbot
Disallow: /

User-agent: rogerbot
Disallow: /

User-agent: MJ12bot
Disallow: /

User-agent: Barkrowler
Disallow: /

#User-agent: Optimizer
#Disallow: /

User-agent: Yandex
Disallow: /