Wordpress Analyse
Generelle Empfehlungen
Emojis deaktivieren
# functions.php
require get_theme_file_path('/inc/remove_emojis.php');
WP Revisionen
Anzahl begrenzen
#
# Code in MichiPedia eingearbeitet
# Code verfügbar in
# Projekte - MichiPedia - Michi Plugin
#
# wp_config.php
# Anzahl begrenzen
define('WP_POST_REVISIONS', 5);
# Revisionen deaktivieren
define('WP_POST_REVISIONS', false);
Datenbank bereinigen
DELETE FROM wp_posts WHERE post_type="revision" ?? Datensicherung !!
oder mit Plugin
WP-Sweep
Advanced Database Cleaner (Younes JFR.)
Linux User- und Schreib/Lese Einstellungen
Linux Befehle um "schnell" Plugins etc installieren zu können
# alles unter 'sudo'
chmod 777 wp_data
chmod 666 .htaccess # Erhöhung Upload Kapazität
chmod 666 wp-config.php # Beschränkung Anzahl Revisionen
chmod 777 wp-content
chmod 777 themes
find <theme-name> -exec chmod 777 {} +
Script um Owner, Group und Access Flags korrekt zu setzen
- Guter Link
- im root Directory von WordPress eine Datei anlegen z.B. permission.sh
- ausführen mit ./permission.sh oder sudo permission.sh
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
WS_GROUP=www-data # <-- webserver group
# reset to safe defaults
find ${WP_ROOT} -exec chown ${WP_OWNER}:${WP_GROUP} {} \;
find ${WP_ROOT} -type d -exec chmod 755 {} \;
find ${WP_ROOT} -type f -exec chmod 644 {} \;
# Michi specials
# find michi2plug -exec chown michael:michael {} \;
# find michi2plug -exec chown www-data:www-data {} \;
# find . -exec chown www-data:www-data {} \;
# allow wordpress to manage wp-config.php (but prevent world access)
chgrp ${WS_GROUP} ${WP_ROOT}/wp-config.php
chmod 660 ${WP_ROOT}/wp-config.php
# allow wordpress to manage wp-content
find ${WP_ROOT}/wp-content -exec chgrp ${WS_GROUP} {} \;
find ${WP_ROOT}/wp-content -type d -exec chmod 775 {} \;
find ${WP_ROOT}/wp-content -type f -exec chmod 664 {} \;