Matthew Gates https://wpbubble.com 17m 4,288 #wordpress
The views of this article are the perspective of the author and may not be reflective of Confessions of the Professions.
16 Problems with WordPress and How To Fix Them
WordPress has become the standard platform for most websites nowadays. On July 17, 2018, WordPress has become the preferred platform of websites by over half, coming in at almost 60% of the market share (of the estimated 2 billion websites in existence [at the time of this writing], with a new website being born every second), this would mean that 750,000,000+ of all websites are operated with the WordPress platform.
With good reason too, as it is very easy to install, setup, and use. Most web hosts nowadays have a one-click install method which does all the work for you. Many hosts are now optimized for WordPress and sell their services at an extremely affordable price, as low as $3 – $5 a month, meaning that pretty much anyone can afford to have a website.
More specialized hosts give you the best and most optimized WordPress performance. Setting up a website with an awesome theme can be done in mere minutes. WordPress is used by some of the richest and most popular companies in the world.
Whether you are an amateur looking to start a website, an entrepreneur looking to start your business, a company owner looking to advertise your products, or just an individual looking to display a portfolio or personal website, WordPress has something to offer everyone! Unfortunately, as wonderful as WordPress is, and while it was made to be so easy, your mom could use it, it is ertainly not without its common problems that come with it, especially after adding a new theme, installing more features and plugins, and tinkering with code (for the more advanced users), there can certainly be problems that arise as you add more elements to your website.
After using WordPress for many years, with my own websites, and client websites, these are some of the most common problems that mostly everyone comes across, and usually, these fixes can be taken care of by following a few procedures.
1. Plugin Errors
If you begin to install plugins and you find yourself with some errors up top, they are most likely due to an installed plugin. To fix it, recall recently installed plugins and deactivate them one by one until you find the problem. If this does not fix the problem, you may need to go as far as deleting plugins. If you cannot gain access to your website, login via FTP and delete the plugin you believe is causing the issue and your website should load again. You can also login to your MySQL database and deactivate all plugins via command.
2. Admin Bar Not Visible
Along with the Admin bar not being visible, you may also find yourself unable to edit pages from the Front End, as the Edit button appears to be missing. With some debugging, your issue will almost always lead back to a plugin that is causing the issue, a cache plugin. If you have WP Super Cache, Quick Cache, W3 Total Cache, or any other plugins that cache, a file most likely became corrupted and is preventing something else from loading up correctly. You will have to deactivate and delete the cache plugin and then re-install it. This should fix the issue.
3. Forgot My Password
If the reset password feature is not sending you an email for recovery, there is probably an issue with your host server, and you will need to contact your host to enable the SMTP feature. If this is not possible, you will have to get into the phpMyAdmin database and reset your password. It is not complicated, but you will need to gain access to the database, and usually, the only way to do that is by going through your web host website in the CPanel. If you are still struggling to reset the password, you can always create a new user with administrator privileges via MySQL phpMyAdmin database.
There are multiple other ways to recover your password in WordPress.
4. White Screen of Death or other PHP errors
If you have installed any recent plugins, that is always the first place you want to check. Otherwise, if you are into coding templates and adding in your own custom code, you will want to enable debug mode, which will display all the errors to you so that you can determine which plugins or files are the source of the problem. If you made any changes to the PHP code, in the Appearance Editor, something may not be closed properly. You will need to access the website via FTP, open the file you may have edited, copy the entire code, and paste it into an online PHP Tester, that checks for errors. If all else fails, re-download the latest version of WordPress and replace all the files.
Make sure you back up the file in the root directory called wp-config.php. Since you are only overwriting files, you will not have to worry about losing your theme or anything stored in the database. wp-config.php, however, does hold the information to that database and WordPress will use it to make the database connection.
If you are in the PHP editor and happen to be editing code and receive error messages that are Unexpected errors, these are the most common ones:
- Unexpected ‘=’ : missing the $ when referencing a variable
- Unexpected ‘)’ : missing an opening bracket (
- Unexpected ‘(‘ : missing a closing bracket )
- Unepxpected T_STRING: missing a quotation mark or a semi-colon at the end of the previous line
- Unexpected T_ELSE: you have an else statement with no opening if statement
5. Email Not Working
Check with your web host before you do anything. Determine whether they allow email to be sent or which plugins may not work. For example, DreamHost will only allow email to come from email accounts that are hosted by DreamHost, disallowing any email to be sent from a third party email address. This policy is in place to prevent spam coming from their server. There are certainly workarounds and plugins to fix this via SMTP, though not all may work.
6. Too Much Comment Spam
There quite a few plugins and ways to combat comment spam including filtering specific words, IP addresses, stopping comments altogether by having to approve them, allowing only comments that are approved at least once, limiting comments to zero or one link and anymore would be seen as spam. Akismet would probably be the additional line of defense along with other plugins that set cookies to determine whether a person or a bot is actually posting the comment.
Ensure that all comment links are nofollow.
Several methods of blocking comment spam without a plugin include going to Settings > Discussion.
- Check the boxes:
- Comment author must fill out name and e-mail
- Comment must be manually approved
- Comment author must have a previously approved comment
- Hold a comment in the queue if it contains 2 [change this number accordingly] or more links.
- Uncheck the box:
- Fill out:
- Comment Moderation for common spam words which WordPress will attempt to match and pick up as spam
- Comment Blacklist
These are some of the best plugins that should block most comment spam.
- Akismet
- Antispam Bee
- Anti-Spam by CleanTalk – No Captcha, no comments & registrations spam
- Bad Behavior
- Comment Redlist
- Cookies for Comments
- Google Re-Captcha 2 (I am not a Robot)
- Growmap Anti Spambot Plugin
- Math Quiz
- Simple Security Firewall
- Simple Trackback Validation with Topsy Blocker
- Spam Honey Pot
- WP Anti Spam
Add this line of code to your htaccess file to better protection against spam bots:
# Protect from spam bots <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_METHOD} POST RewriteCond %{REQUEST_URI} .wp-comments-post\.php* RewriteCond %{HTTP_REFERER} !.yourwebsite.com.* [OR] RewriteCond %{HTTP_USER_AGENT} ^$ RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L] </IfModule>
Comment spam tends to happen in spurts and then passes. It is as if spam bots go scanning for websites, post comments, detect how many websites they can get through, and if the results are that none of the comments are appearing, the resources are no longer wasted on your website, and the bots move on. A few months later, you will notice that you get hit by another wave again, as if the spam bots are making their rounds, testing websites to see if their comments can get through, otherwise, if not successful, they stop visiting as much. It is, of course, always best to keep anti-spam measures activated, whether you are receiving a ton of spam or not.
The only surefire way to stop comment spam completely is to disable the comment system.
7. All Pages Showing Up In Navigation Menu
Once you start adding pages, they tend to show up in the Navigation menu. While you probably want some of your pages to be listed, you might not want them all to be there.
There are three ways that might accomplish this:
a. Going to Appearance and Menus on the left sidebar in the Admin screen, creating a menu, and adding your pages there may only make that specific navigation menu appear with your chosen pages.
b. A plugin called Exclude Pages will allow to check off a box on the side of the page to exclude or include the page in the navigation menu.
c. If you are trying to avoid using plugins, you can hard code this line of code, if you have the Post ID, in either the header.php or sidebar.php file, wherever your theme might have the navigation menu code.
<?php wp_list_pages(‘exclude=1,6’ ); ?>
8. Media Uploads: HTTP Error
If you are constantly getting errors when uploading media, there could be a few possible reasons for this:
- The folder permissions for the WP-Uploads folder was changed, and you no longer have access to this folder. Logging into your FTP server via FileZilla or another FTP program, you can right click on the WP-Upload folder and change the folder permissions to 755 or 777, change individual file permissions to 644.
- A security or cache plugin may be preventing uploads from occurring.
- You are out of PHP memory on your server and you will need to increase the memory limit through the PHPRC, PHP.ini, wp-config.php, or .user.ini file. If you do not have access to this or do not know how to do it, contact your web host and they will increase the limit for you.
9. Slow Website
If your website is running slow, you have already lost visitors. The good news is that you can still speed up your website and acquire a lot more visitors who will continue returning to your website. Ensure your website is fast by reducing clutter in the code, using only essential plugins, and reducing queries to the WordPress database by replacing the default code with hard code.
Consider upgrading from a Shared to a VPS or give WordPress Managed Hosting a try. Uninstall inactive plugins. Make sure you are running a cache plugin or that your website is running on an optimized server designed for WordPress.
For more information on speeding up your website, check out my other article, which offers over 30 tips on how to Speed Up A Slow Website.
10. My CSS changes are not reflecting on my website.
There are several things that could be preventing you from seeing the updated CSS changes on your website including:
- caching or the rules are being ignored, due to another CSS file being loaded up with the same rules, but different properties, undoing the new changes
- you have the rules set in two different places in the CSS files with one overwriting the other
- the website or page is currently cached and the settings are not set to refresh the page or you may need just need to clear your cache
- in almost all cases, a css tag is not properly closed or a semicolon is missing
Instead of changing the master and default files, it is better to use the Simple Custom CSS plugin to make your changes, which will overwrite all other CSS files from theme and plugin files. Changes should be seen immediately.
If you are still having issues, you may want to download the Firefox CSS Reloader plugin or Chrome CSS Reloader extension.
You may also want to consider using a CSS validator to clean up and clear any warnings or errors.
11. WordPress Editor Toolbar (TinyMCE) Not Displaying / Can’t Switch Visual or Text Tab
This issue occurs when you go to edit or publish a post and you cannot see your content. The only way for you to actually see it is to highlight it, and even then, you will see the text as if it were code and you were on the Text tab. When you try to switch tabs, you may be unable to switch tabs.
This issue may occur due to several reasons:
- plugin conflicts
- corrupt WordPress core files
- issues with WordPress cache files
- issues with WordPress cache plugins
- issues with Browser cache
- issues with WordPress database
- issues with Flush DNS cache
- etc.
There are several things to do before you drive yourself crazy. Unfortunately, a search of this issue usually reveals a ton of solutions, and hardly any of them seem to work, except for the one or two people who found that it resolved their issue.
In order to fix this issue, there are several solutions:
- clear browser cache
- clear WordPress plugin cache
- clear server Varnish cache if your server has it enabled
- flush your dns cache
- disable each plugin on at a time
- disable all plugins at once
- make sure plugins are up to date
- make sure you are on the latest version of WordPress
- make sure you are using the latest version of your browser
- repair and optimize the WordPress database
- log out of the admin and log back in
- try a soft refresh (f5)
- try a force refresh (ctrl+f5)
- try a different browser
- try restarting your computer
- change your template back to the default WordPress template to see if the issue occurs with just your theme
- go to Users > select the Admin username:
- Select the option and click Update Profile
- Deselect the the option and click Update profile
- Click Log Out of All Other Sessions
- close the browser completely and make sure to end task in case it is still running in the background
- if you are not the Admin, make sure to check the Role of the Account, which may have the toolbar disabled
- try adding the TinyMCE Advanced plugin
- navigate to http://www.yoursite.com/wp-admin/update-core.php and re-install WordPress
- check the .htaccess file to ensure nothing is being blocked or code is preventing something from loading
- if you are using CloudFlare or other software, double check to ensure the proper settings are set
- check and disable browser extensions, plugins, or addons
- try replacing the files in this folder with a fresh copy:
- /wp-includes/js/tinymce/
- run an anti-virus scan on your server to ensure there is no malware running in the background
- open up wp-admin/admin-footer.php and comment out line 36
do_action(
'admin_footer'
, "");
- if all else fails, try opening wp-config.php and adding this line:
define(
'CONCATENATE_SCRIPTS'
, false);
- if everything has failed, contact your host to see if they offer technical support
12. WordPress 404 Errors
You know the page exists, yet WordPress cannot seem to find it. You have cleared your cache, refreshed the page, and still are getting a 404 error page. You can get to the homepage, but all of your posts and pages cannot be found. Don’t panic. Sometimes messing around inside the htaccess or changing the way the directory structure is read can mess up some things. There is an easy fix for this.
Navigation to your Settings > Permalinks. You probably have the “Post Name” selected. Choose “Default” and Save Changes. After the changes are saved, choose “Post Name” again and click Save Changes. This should fix the issue.
13. WordPress Account Hacks
Since WordPress is one of the most popular frameworks in the world, it has a lot of exposure to the public eye, and the eye of hackers. Many applications have been developed for Brute Force attempts at breaking into the backend of a WordPress website. These applications are designed to go through the dictionary, try different combinations of words and numbers, until it breaks into the website. Most WordPress users hardly give it a second thought believing that it could never happen to them, but it most certainly does.
Almost every WordPress installation comes with easy access to the backend: /wp-admin/
Type this into any website that is running WordPress and you will be presented with a login screen.
Adding ?author=1 to the end of a domain will tell the hacker exactly what the username is that they can attempt to crack. I wrote an article for DreamHost on fixing this security issue so that no author names are ever exposed. Many individuals and companies who run websites may or may not perform backups, relying on their web hosts to make backups for them, and only when an issue arises, do they take action in hopes that something can be done.
Prevention is the best method of stopping any hacks from happening. By not exposing the author name of the website, by changing the default wp_ prefix in the MySQL database; by deleting the “admin” user and choosing something completely different that does not have the word “admin” in it; by using this password strength meter; by adding extra security protection to the wp-admin area so an additional password step is required; and even requiring a two-step authentication factor on top of everything, which would add a total of three layers of security, and also send a verification to your phone, to be confirmed in the backend in order to login.
Some examples of top websites using WordPress that use these processes:
- Mashable.com uses htaccess to protect wp-admin
- TechCrunch.com blocks any user without privileges to access the backend
- Boingboing.net leads to wp-admin, but with additional security to “prove your humanity” along with username and password
- Reuters.com forbids access with a 403 error.
Many of the top sites lead directly into the wp-admin for easy brute force hack attempts. While removing or redirecting wp-admin require more professional understanding of WordPress, it is very possible to change the wp-admin url. If you do pursue the wp-admin url method of securing your website, it is highly recommended you doing it with a test website that is not live, as changes may be irreversible, and access to a website may be denied.
Read more about Hardening WordPress against security vulnerabilities. Many of these security issues can be patched up by adding several lines of code to the htaccess file in order to protect specific files and folders that make up your website, such as the wp-includes folder, the wp-config.php file, and the .htaccess file itself.
Add these lines of code to your .htaccess file:
# Block the include-only files. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^wp-admin/includes/ - [F,L] RewriteRule !^wp-includes/ - [S=3] RewriteRule ^wp-includes/[^/]+\.php$ - [F,L] RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L] RewriteRule ^wp-includes/theme-compat/ - [F,L] </IfModule># Protect the htaccess file <Files .htaccess> Order Allow,Deny Deny from all </Files> # Protect wpconfig.php <Files wp-config.php> Order Allow,Deny Deny from all </Files>
14. Database Connection Issues
This is a common occurrence among many websites, especially when they are just starting out. The database serves as a brain for WordPress, which cannot run on its own. It needs to make the connection to the database to gather information on what it is supposed to display. When you see this message, WordPress is having a hard time making a connection to the database. In almost all cases, the credentials are inaccurate. Navigate via ftp to the wp-config.php file and check to ensure all the information is correct. These are the lines you will see and need to make sure are getting the right information.
// ** MySQL settings - You can get this info from your web host ** // /** 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'); /** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8'); /** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', '');
On a very rare occasion, you may have downloaded a plugin that somehow managed to access and generate a random password in the wp-config.php file. A hacker may have also tried to tinker with the wp-config.php file, or the actual wp-config.php file became corrupted. To fix this, you will probably have a copy of wp-config-sample.php in your root directory. Download that file, open it, and input the correct database credentials inside. Rename the wp-config-sample.php file to wp-config.php and re-upload the file to the location of your WordPress directory, most likely the root folder.
15. “Are you sure you want to do this?”
This is probably the worst phrase that WordPress came up with. This usually appears when you click a link within a plugin and are trying to do something. If you are clicking on something, you are probably sure you wanted to do it, so why doesn’t WordPress just give you the error associated with it instead of asking “Are you sure you want to do this?” Clicking “Try again” does not do a thing, just takes you back to the previous page. So what can you do? There are a few reasons why this error occurs.
- You do not have privileges to access the area (i.e. you are not an Administrator, but the plugin requires it).
- The plugin you are trying to interact with is not installed.
- The plugin you are trying to interact with is out of date.
- Your cache is corrupt and you need to clear it.
- The plugin may be demanding more memory than your host allows. There are several ways to fix this by increasing the memory, if your host allows it:
- Update your php.ini file (create a php.ini file in the root directory of your website) and add these lines:
- memory_limit = 128M
- upload_max_filesize = 100M
- post_max_size = 10M
- Update your wp-config.php file and add this line somewhere at the bottom of the file (below the “WP_DEBUG” line)
- define(‘WP_MEMORY_LIMIT’, ‘256M’);
- Update your .htaccess file and add this line:
- php_value memory_limit 256M
- Update your php.ini file (create a php.ini file in the root directory of your website) and add these lines:
- Deactivate and uninstall any plugins you are not currently using.
- If these methods fail, you will need to contact your host to see why you are getting this error.
- Your host may be able to upgrade you to a “Plus” plan which usually is one step below a VPS and only an extra $1 – $5 if you choose to remain on Shared hosting.
- You may need to upgrade to a VPS which may cost you anywhere from $5 to $10 extra a month but allot you the resources you need.
- If you are already on a VPS, you may be using up all of your resources and may need to increase them.
- If additional problems persist, your host should be able to tell you what exactly is happening, from the log records that most hosts have activated to understand any issues your site may be having.
16. Database Corruption
On other rare occasions, your posts may not be showing up or weird letters are showing. It is likely that the WordPress database has become corrupt and may need repairs. From normal wear and tear and from not optimizing a database, after creating, deleting, editing, and millions of entries into the database, it may just need an optimization tune-up. To fix this, navigate to your wp-config.php file, and add this line:
define('WP_ALLOW_REPAIR', true);
Save the file. Enter this URL: http://yoursite.com/wp-admin/maint/repair.php
Change yoursite.com to your domain name. This will put up the screen you see above. Click on Repair and Optimize Database. WordPress should be able to repair the database so your blog returns back to normal. If this option does not work, you may need to login directly through phpMyAdmin and repair or optimize the tables manually. Once you are in phpMyAdmin, navigate to your database, click on Check All, and click on the dropdown box that says With selected:, as you can see in the image below.
Many of the issues found in WordPress are usually due to human error and not WordPress itself, as the WordPress product is completely open-source and has thousands of developer eyes on it, improving the security code and making enhancements daily, with updates occurring about every 6 months, and security vulnerabilities patched even sooner.
A quick search of many errors will usually lead you to a solution. Chances are, if you are having an issue, someone else has had the same issue and it has probably already been solved. It is rare to find an issue that has not been solved, but if the issue is brand new, never been seen before, you can post your issue on the WordPress forums, where there are hundreds of developers willing to help solve the issue. If you happen to discover a solution for yourself before a developer has a chance to help, be sure to include your solution with your original issue, as this will help other people who may come across that same issue in the future.
(