In this slideshow for WPCampus, you will learn methods for Troubleshooting WordPress website problems. This will help you narrow down the cause of most WordPress problems. You can also see the video presentation here: https://youtu.be/QiryJaNrNoo
5. ● Backup using a plugin
○ All-in-One WP Migration
○ Updraft Plus
○ Total Upkeep
● Backup using hosting tool
○ cPanel
○ Softaculous
● Backup manually
○ Files
○ Database
● Backup with web host service
How to Backup Your Site
Helpful links:
● WordPress Backups – Protect Your WordPress Website
5
7. ● Reset via email
○ Using the “Lost your password” link on the login page.
● Reset in database
○ wp_users table
■ Can change password using MD5
■ Can change user email then request the “Lost password” email
● Reset via FTP
○ wp_set_password function (advanced users)
How to Change Passwords
Helpful links:
● How to Reset your WordPress Admin Password
7
9. 1. Edit wp-config.php file
2. Add the following lines to your wp-config.php file:
define( 'WP_DEBUG', true );
define( 'SCRIPT_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
● 1st line will cause WordPress to display any errors from PHP
functions that are built into WordPress.
● 2nd line will display any errors for WordPress' built-in JavaScript
and CSS.
● 3rd line will save errors to a debug.log file in the “/wp-content”
folder.
Note: There are also plugins for enabling debugging
How to Enable WordPress Debugging
9
10. Keep in mind that your web host may have other error logs that
you can check. These can provide additional evidence and clues
into the cause of your issues. Here are some examples:
● cPanel Error Log
● MySQL Error Log
● NGINX Error Log
Helpful links:
● How to Enable WordPress Debugging
Other Error Logs
Helpful links:
● How to Enable WordPress Debugging
10
12. A wide range of problems can be caused by plugin/theme issues.
Since they are created by different 3rd party developers there can
be compatibility issues.
Some developers may not update their plugin/theme often, or at
all. This can cause them to deprecate over time as WordPress
updates are released. Since they may no longer be compatible with
new feature releases or coding changes.
Why Test Plugins/Themes?
12
13. ● Check that plugins are up-to-date.
● Disable one-by-one in the Dashboard. Plugins->Deactivate
○ Time-consuming
○ Requires Dashboard access
or
● Rename the /wp-content/plugins folder
○ Fast since it immediately disables all plugins
○ Some plugins may not re-enable when naming the folder back
How to Test Plugins
13
14. How to Rename the Plugins folder
1. Open /wp-content folder
a. Rename /plugins folder to plugins.bak
b. or open the /plugins folder and rename the specific plugin folder
Note: You may have to manually enable the plugins after performing this test.
Helpful links:
● How to Update WordPress Plugins
● How to Disable WordPress Plugins
14
16. How to Test Themes
● Check for theme updates
● Change to a default WordPress theme in the dashboard
○ Appearance->Themes->Activate
● Default themes, include:
○ Twenty Twenty One, Twenty Twenty
● Don’t have Dashboard access?
○ Rename the current theme in the /wp-content/themes/XXXX folder should
cause it to revert to a default theme.
Helpful links:
● How to Update a WordPress Theme
● How to Change a WordPress Theme
16
18. How to Troubleshoot Email
If you are missing form submissions or other WordPress related
alerts that should be sent over email, here are some things you can
check:
● Admin Email setting in the Dashboard
● Server’s Mail logs
○ Can check the EXIM log directly with SSH
○ Can check with a plugin such as WP Mail Logging
18
19. Other Email Tests
● Install an SMTP plugin.
● Verify the settings are correct by accessing email/Webmail with
them.
Helpful links:
● View full summary of mail activity from the Exim mail log
● How to Use the WP Mail Logging Plugin for WordPress
● Learn How to Install and Use the WP Mail SMTP Plugin
19
21. Bad User Experience!
If a site takes too long to load, a potential customer will probably
bounce.
Bounce (loosely defined): to leave a slow website in frustration and
never return.
Visitor may get the impression the site is not properly optimized
and (possibly) less secure.
A customer getting a bad impression of your site can be disastrous
for e-commerce.
Why Is a Slow Site Bad?
21
22. Things That Can Slow Down a Site
● No Site Caching
● Slow Scripts loading
● Large Images
● Outdated Plugin
● Outdated Theme
● Hack/Attack (DDOS)
● Routing Issues (Network outage)
● Large sudden influx of traffic
● Hosting environment that is not optimized for WordPress sites
22
23. Site Optimization Best Practices
● Utilize site caching
● Move slow scripts to the bottom of the page
● Optimize Images
● Test Plugins
● Test Themes
● Use security best practices
● Address routing issues with host or ISP
● Use a CDN (or servers that are closer to your visitors)
● Upgrade your hosting plan
● Get WordPress Optimized Hosting plan
23
25. Error Establishing a Database Connection
● Verify your database settings are accurate
○ Database name - DB_NAME
○ Database user - DB_USER
○ Database password - DB_PASSWORD
○ Database hostname - DB_HOST
● Does database user have permission to access the database?
● Create a new user and give permission to access the database
Helpful links:
● WordPress - “Error Establishing a Database Connection”
25
26. Corrupt Database
● Repair it via SSH using WP-CLI
● Repair it using mysqlcheck
● Repair it via hosting tool
○ cPanel
Helpful links:
● Check and Repair Database with WP-CLI
● How to Check and Repair a Database in phpMyAdmin
26
29. How to Reset Permalinks
1. Click Settings then Permalinks in the Dashboard.
2. Remember or save the current setting.
3. Choose a different setting, then click the Save Changes button.
4. Now select your original setting, and click the Save Changes
button again.
Note: You may have to clear your browser cache before testing.
Helpful links:
● How to Reset WordPress Permalinks
29
30. About .htaccess
● What is an .htaccess file?
○ Hidden file that handles rewrites and redirects
● Some common uses of the .htaccess file would be restricting
access to certain files or redirecting URLs.
● WordPress relies on .htaccess rules, so adding rules directly can
interfere with how it works.
● Plugins can add rules to .htaccess file
● How to test an .htaccess file?
○ Rename it!
30
31. How to rename an .htaccess file
● Locate and rename the .htaccess to .htaccess.old and reload the
website. If the site loads you know the issue is caused by a rule in
the .htaccess file.
Keep in mind there may be other .htaccess files in a parent
directory (can inherit rules).
Helpful links:
● Reset the .htaccess File to Troubleshoot WordPress PHP Errors
31
33. 1. Create a file such as: phpinfo.php
2. Enter the following code and save:
<? phpinfo(); ?>
3. Visit the file in your browser:
example.com/phpinfo.php
View PHP Settings with phpinfo Page
Helpful links:
● How to Create a phpinfo Page to View Your PHP Settings
33
34. ● Change settings in php.ini file -
○ Edit the php.ini file and adjust the value for:
■ max_execution_time
■ max_input_time
■ memory_limit
■ upload_max_filesize
● Change settings with a plugin
Change PHP Settings
Helpful links:
● How to Change PHP Settings in your Hosting Account
34