$30 off During Our Annual Pro Sale. View Details »

Fix a broken WordPress site

Fix a broken WordPress site

Tools and steps to help you troubleshoot errors and seek help when your WordPress site breaks.

Kristen Symonds

August 11, 2016
Tweet

More Decks by Kristen Symonds

Other Decks in Technology

Transcript

  1. FIX A BROKEN WORDPRESS HOW TO

  2. WHY SHOULD YOU KNOW THIS? ▸ Fix your mistakes ▸

    Fix someone else’s mistakes ▸ Provide useful information when seeking assistance
  3. CODEX.WORDPRESS.ORG/TROUBLESHOOTING THE CODEX ▸ The codex has a whole troubleshooting

    page! ▸ installation ▸ login problems ▸ themes ▸ other common issues
  4. 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
  5. FTP CLIENTS ▸ Use SFTP when possible ▸ Commonly needed

    for ▸ turning on WP_DEBUG ▸ disabling plugins ▸ disabling theme
  6. SEQUEL PRO OR PHPMYADMIN DATABASE CLIENTS ▸ Good to: ▸

    Reset password ▸ Repair/optimize database ▸ Automatically ▸ Remove spam, post revisions ▸ Fix encoding ▸ Backup database
  7. 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 );
  8. WORDPRESS.ORG/PLUGINS/DEBUG-BAR/ DEBUG BAR ▸ Shows ▸ PHP errors & warnings

    ▸ Queries on current page (what is being requested from the database)
  9. 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
  10. 500 ERROR

  11. 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
  12. BROWSER ISSUES INSPECTOR TOOLS & CONSOLE ▸ In a browser,

    right click & ‘Inspect Element’ ▸ Yellow ⚠ for warnings, red ❌ for errors
  13. EXAMPLES

  14. 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)
  15. IMAGE CREDITS ▸ https://www.flickr.com/photos/odisea2008/9159834089/