Slide 1

Slide 1 text

FIX A BROKEN WORDPRESS HOW TO

Slide 2

Slide 2 text

WHY SHOULD YOU KNOW THIS? ▸ Fix your mistakes ▸ Fix someone else’s mistakes ▸ Provide useful information when seeking assistance

Slide 3

Slide 3 text

CODEX.WORDPRESS.ORG/TROUBLESHOOTING THE CODEX ▸ The codex has a whole troubleshooting page! ▸ installation ▸ login problems ▸ themes ▸ other common issues

Slide 4

Slide 4 text

FTP & MYSQL KNOW YOUR SITE! ▸ WordPress is made up of files & database ▸ Keep a way to access your files ▸ FTP, SFTP, SSH ▸ Host file manager ▸ Know how to access the database if you have to ▸ phpMyAdmin ▸ Sequel Pro

Slide 5

Slide 5 text

FTP CLIENTS ▸ Use SFTP when possible ▸ Commonly needed for ▸ turning on WP_DEBUG ▸ disabling plugins ▸ disabling theme

Slide 6

Slide 6 text

SEQUEL PRO OR PHPMYADMIN DATABASE CLIENTS ▸ Good to: ▸ Reset password ▸ Repair/optimize database ▸ Automatically ▸ Remove spam, post revisions ▸ Fix encoding ▸ Backup database

Slide 7

Slide 7 text

CODEX.WORDPRESS.ORG/DEBUGGING_IN_WORDPRESS WP_DEBUG ▸ Turns on display of errors ▸ Most useful for: ▸ WSOD (white screen of death) ▸ truncated page (eg sidebar, or footer completely missing) ▸ Turn to false when not using ▸ Can use with a plugin (eg Debug Bar) ▸ define( 'WP_DEBUG_DISPLAY', false ); /** The name of the database for
 WordPress */
 define( 'DB_NAME', 'database_name_here' ); /** MySQL database username */
 define( 'DB_USER', 'username_here' ); /** MySQL database password */
 define( 'DB_PASSWORD', 'password_here' ); /** MySQL hostname */
 define( 'DB_HOST', 'localhost' ); … define( 'WP_DEBUG', true );

Slide 8

Slide 8 text

WORDPRESS.ORG/PLUGINS/DEBUG-BAR/ DEBUG BAR ▸ Shows ▸ PHP errors & warnings ▸ Queries on current page (what is being requested from the database)

Slide 9

Slide 9 text

READING ERRORS PHP ERROR ▸ Fatal ‣ Call to undefined function add_acction() ▸ in ▸ line Fatal error: Uncaught Error: Call to undefined function add_acction() in / kristarella/wp-content/plugins/my-plugin.php:6

Slide 10

Slide 10 text

500 ERROR

Slide 11

Slide 11 text

GENERIC SERVER ERROR 500 ERROR ▸ If you just did something, undo it! ▸ Check host error logs ▸ define( 'WP_DEBUG_LOG', true ); ▸ automatically creates wp-content/debug.log ▸ Fix or remove error

Slide 12

Slide 12 text

BROWSER ISSUES INSPECTOR TOOLS & CONSOLE ▸ In a browser, right click & ‘Inspect Element’ ▸ Yellow ⚠ for warnings, red ❌ for errors

Slide 13

Slide 13 text

EXAMPLES

Slide 14

Slide 14 text

TROUBLESHOOTING STEPS 1. Undo what you just did 2. Upgrade themes & plugins & core 3. Disable plugins ‣ activate 1 by 1 4. Activate default theme 5. Check Browser Console 6. Enable WP_DEBUG 7. Check error logs ‣ Google search for error message 8. Ask for help ‣ wordpress.org/support ‣ paid plugin author ‣ WP meetup ‣ clickwp.com (paid)

Slide 15

Slide 15 text

IMAGE CREDITS ▸ https://www.flickr.com/photos/odisea2008/9159834089/