Troubleshooting WordPress Issues

This article introduces the steps to check WordPress website issues and how to solve them.

1. Check the package resources usage

2. Check domain DNS A records

3. Check WordPress container running environment

4. Check the configuration of Apache

5. Check the permission of root directory

6. Check if some files are missing

7. Check database connection

8. Check the website URL in database

9. Check website logs

1. Check the package resource usage

If the usage of the resources is very high, please try rebooting the application by referring to the article Rebooting WordPress Service.

If the issue still cannot be solved after the reboot, you may need to increase your resources by upgrading your plan or adding add-ons. Or you can contact us at support@cloudclusters.io, we will be happy to help you.

2. Check domain DNS A records

  • An A record is your domain’s IP address. It should be the same as the one shown in the Control Panel. You can check it at https://intodns.com/ or check it on your local machine by executing the command “ping your-domain”.

If the A record is not the same as the one in the Control Panel, you need to replace your current A Record value with the one provided in the Control Panel. Please refer to Managing DNS Records to update the A records if you are using our nameservers (ns1.cloudclusters.net and ns2.cloudclusters.net).

3. Check WordPress container running environment

  • Check the status of your application in the Control Panel. If the status is not running, please contact us at support@cloudclusters.io.

  • Check if processes, like apache, php-fpm, and mysql, are running normal by running the command “supervisorctl status” via shell interface. The processes are working just fine if the result is as the following screenshot shows.

If any one of the processes is not working, please try rebooting your WordPress service by following the guide Rebooting WordPress Service.

If the problem persists after the reboot, please contact support@cloudclusters.io.

4. Check the configuration of Apache

  • Check if the website domain name in Apache configuration is correct.

Navigate to /cloudclusters/config/apache by executing the command “cd /cloudclusters/config/apache” and open the wordpress configuration file with command “vi wordpress.conf”.

Note: Replace wordpress.conf with the name of your own configuration file.

In the file, you can see the ServerAlias value. It should be the domain name you added in the Control Panel. If it is not correct, please update it.

5. Check the permission of root directory

  • Check if the Owner and Group of all files both are www-data.

Navigate to the root directory of WordPress and run command ‘ll’ to list the file owner and group of each file or directory.

If they are not, please change file owner and group to ‘www-data’ by following commands “chown -R www-data:www-data file_name/directory_name”. The file_name/directory_name should be replaced with the one you need to make changes to.

6. Check if some files are missing

  • Check if files index.php, wp-blog-header.php, template-loader.php, wp-load.php, wp-config.php are included.

Navigate to the root directory of WordPress and run command ‘ls’ to list all the files and directories. The correct directory structure should be look like the content in the screenshot. The files index.php, wp-blog-header.php, template-loader.php, wp-load.php, wp-config.php must be included.

If any files as stated above are missing, you can reinstall your WordPress (refer to Initializing your WordPressor restore a snapshot of your WordPress (refer to Restoring a System Backup.

7. Check Database connection

  • Check if the database connection is available.

Navigate to File Manager, then go to the root folder of your WordPress site and open wp-config.php file to get the login credentials of MySQL.

Connect to Web Shell and test the database connection by command ‘mysql -h127.0.0.1 -uadmin -p’ and then input the password. If you cannot connect to the MySQL, please contact us at support@cloudclusters.io.

8. Check the website URL in database

  • Check if the website url in database is the same as the one you added in the Control Panel.

Please make the domain you added to the Control Panel as primary.

Open phpMyAdmin and check the URLs in wp_options table.

Check the above URLs are the same as the one in the Control Panel. If they are not, please update them via phpMyAdmin.

9. Check website logs

  • Check WordPress website logs to locate the issue

Navigate to File Manager in the Control Panel and open wp-config.php.

Add the following lines above the line ‘/ That's all, stop editing! Happy blogging. /’ and click save to enable Debug mode in WordPress. define( 'WP_DEBUG', true ); // Enable Debug logging to the /wp-content/debug.log file define( 'WP_DEBUG_LOG', true ); // Disable display of errors and warnings define( 'WP_DEBUG_DISPLAY', false );

Now, you will be able to see the logs in /wp-content/debug.log file.

Check the log of apache in Shell/ SSH by executing the command: vi /var/log/apache2/error.log

You can search for the solutions with the error information you get. If you still cannot solve the issue, please contact us at support@cloudclusters.io.

Copyright © 2019 Cloud Clusters Inc.Revised on 05/10/2021

results matching ""

    No results matching ""