Firefighters by Andrew Magill

Translated by Núria Adell.

One of the most successful posts in our blog in Spanish is the solution to the 5 most common problems in WordPress (here you have the English version). Since we published it in mid 2015, the number of visits hasn’t ceased to increase and it has generated a very interesting thread of comments looking for support to problems that, in some cases, weren’t solved in the original post.

Seeing these problems come up over and over again (both in the comments section and through emails), I thought it would be useful to compile them here and give you the solution to all of them. So… get ready to learn some more tricks to become a handyman of WordPress repairs!

0. Reviewing the most common problems

Before starting with the new list of problems I have waiting for you, maybe it’s worth looking back and quickly reminding you of what we looked at a few months ago. If you think you have one of these problems, I recommend you read the original post to see the solution in greater detail:

  1. The white screen of death (WSOD). This is one of the most common problems you might encounter. You’ll know you have it because, as the name indicates, your WordPress will go completely blank when you try to access it. The problem is usually caused by a recent change (a new plugin or theme, an update of one of them, or WordPress itself…)
  2. INTERNAL SERVER ERROR. This is an error similar to the previous one; in fact, the WSOD happens because an error like this has occurred. The causes tend to be the same, so you’ll have to check the logs and make sure everything is right.
  3. ERROR ESTABLISHING DATABASE CONNECTION. This is usually a server’s error, but sometimes it can be something as stupid as having changed the user and/or the password of the database and so WordPress cannot access it anymore. Look at the settings of your server or contact your hosting provider.
  4. Error on the automatic updates. It’s difficult to realize the automatic updates are failing because, well, they’re automatic and so you’re not supposed to be in front when they’re executed. What you can see are the results of a failed update: WSOD, errors 500, etc. Check that everything is right (as it is explained on the WSOD solution) and finish the update manually.
  5. Posts of WordPress with Error 404. Another common error, especially if we’re playing with the settings of the permalinks or plugins that manipulate the .htaccess file. Usually, putting a default .htaccess solves the problem.

1. Error 500 and similar cases – The white screen of death that stopped being white

The error 500 is one that appears more often than we like to admit. And it’s not just me saying it; I’ve seen it on the comments our visitors send. This type of error is the one that generates the white screen of death (when you have the log of errors deactivated):

The white screen of death (WSOD) is one of the main sources of panic amongst the users of WordPress.
The white screen of death (WSOD) is one of the main sources of panic amongst the users of WordPress.

or that which creates frightening messages like this one:

WordPress errors ? Well, at least they tell us there's something wrong, right?
WordPress errors ? Well, at least they tell us there’s something wrong, right?

In these cases, what we have to do is find the culprit that’s generating this error. If your log is activated (as we explain here), it’s very possible that there’s a line on the screen indicating exactly what file generated the error. What’s most common is that this file corresponds to a plugin or your theme, so you’ll just have to deactivate it in your installation, reinstall it from scratch (to ensure it’s not corrupted), and, if the error persists, contact the author asking for help.

If you don’t know what’s creating the problem, you will have to make a “witch hunt”. In other words, you’ll have to deactivate all the plugins and change your current theme to the default theme (Twenty Seventeen at the date of this post) to have a “pealed” WordPress installation. In 99% of the cases, this solves the problem, so now you just have to start reactivating each of the plugins until the system fails again to identify which one is responsible.

If this doesn’t work, you have a more serious problem than we thought. Maybe your website has been hacked? Jump to point 6 for more information ?

2. I can’t interact with the user interface

Other times, what happens is that seemingly everything works as it should (the dashboard of WordPress loaded correctly, we can see the components, we see the editor to modify the posts, we can see the boxes around…) and when we try to interact with the page we discover that, in reality, things aren’t working. One of the original comments put it this way:

(…) On the section “Posts”, what would be the emerging/pull-down options don’t work. For example, from the general list of posts, the quick edition doesn’t work (…)

Then, inside the article, we cannot change from “Visual” to “Text”, the “add media” doesn’t work, nor it allows us to put the corresponding labels or edit the date.

The change in “Pages” works fine.

What is happening here? ?

Many of the features available when we interact with WordPress work through JavaScript, since this way we get a much more fluid interaction. All the “blocked” features that our reader mentions depend on JavaScript working correctly, so it is normal to think that some plugin added a new script that contains errors, and therefore, makes everything fail. 

As always, the first thing we must do to solve the problem, is identifying the culprit. To do so, open the developing tools of your browser and look into the JavaScript console to see if an error comes up. If things are as we imagine, you should see something like this:

By opening the developers console of your browser, you can see the JavaScript errors. From here, it's easy to identify the responsible file and so identify the plugin that added it.
By opening the developers console of your browser, you can see the JavaScript errors. From here, it’s easy to identify the responsible file and so identify the plugin that added it.

If you expand the error, you will be able to see a bunch of calls that have been produced. It is common to have several calls to JavaScript frameworks (like jQuery) and just one or two that are directly related to the guilty plugin; find this function and you’ll know what plugin to deactivate.

Then, it’s your call to decide how to procede. In these cases I personally recommend to contact the developer and expose him the problem you have encountered; if there is really a bug in his code, he’ll be grateful for the information and I’m sure he’ll correct it.

3. My posts show weird characters

Another error you might face, are posts with weird characters. For instance, one of our readers of the Spanish version of the blog told us his browser showed results such as these:

[vc_row full_width="stretch_row" gap="15" content_placement="top"][vc_column][vc_custom_heading text="Picadora de forraje autopropulsada Modelo FS60" font_container="tag:h1|text_align:center|color:%23000000" google_fonts="font_family:Roboto%20Slab%3A100%2C300%2Cregular%2C700|font_style:700%20bold%20regular%3A700%3Anormal"][vc_separator color="white" border_width="5"][/vc_column][/vc_row][vc_row full_width="stretch_row" gap="15" content_placement="top" wd_row_delimiter_style="vertical_line_bottom_center" wd_row_delimiter_color="#bbbbbb"][vc_column width="1/2"][vc_single_image image="3700" img_size="540×306" style="vc_box_shadow_3d" onclick="zoom" css_animation="appear"][vc_gallery type="image_grid" images="3691,3692,3693,3695,3696,3697,3694" img_size="180×180"][vc_column_text] OTROS PRODUCTOS FS60 FS6025 FS80 FS8060 [/vc_column_text][/vc_column][vc_column width="1/2"][vc_column_text] Las cosechadorsa PALESSE FS60 son famosas como un modelo económico y accesible de amplio uso. La máquina cumple con seguridad los trabajos de acopio de forrajes, henolaje y materia verde. Para asegurar…

In this particular case, the key is looking at the content that WordPress is giving us; they’re not incomprehensible random characters, but text that we can read. Look at what says vc_row, vc_column, vc_single_image… these look like “labels” of an HTML layout, but without being HTML. In fact, in the previous case, we can even read how it ends as a normal text: “Las cosechadoras son famosas como (…) La máquina cumple con seguridad (…)” What is all of this? ?

In this example, what we see are labels inserted by a plugin called Visual Composer. This plugin allows users who are not very skilled at HTML to create pages using the typical “drag and drop”, allowing anyone to create attractive pages in just a few minutes. But, of course, the page the user is creating with his editor must be stored somewhere and, in this case, this is done through shortcodes (vc_row, vc_column, etc.), which we can see on top.

If you find something similar to this, check two things:

  1. If this is only happening when you make a search or on the lists, but when you go to the post/page/product you can see them well, edit this post/page/product and add an excerpt to it. By default, if you don’t define an excerpt, WordPress will take a few words of the content of your post to create the excerpt. In this case, the content includes the shortcodes, so the result that WordPress gives by default is invalid and so you have to define this “summary” manually.
  2. If this happens in all the pages of a certain type, it’s very possible that you have changed the theme and/or deinstalled the plugin that added these shortcodes. In these cases, you have two options: either reinstall the theme and/or plugin that you were previously using so that the shortcodes become available and are well laid out, or you can create the page again from scratch without using these shortcodes.

At other times, what comes up in your screen is completely illegible and nothing we see on our browser makes sense. I’m talking about things like this:

‹í=]sÛ8’ï÷+`N%MÄ/I–eÙr&q’ÝÜ9“TìÙ¹«8¥‚HH¢C~Xö:®Úr÷°?`Ÿöí^óOö—7@J¤DIv$;ÉM¦& 4ºFwh’[6·¢+Ÿ‘a4rÉ!9ØRÕwNŸ¼|NZïD©åÒ0ì(k)Ä¥Þ £0OAÐw̳þ{U͵ۛk··ºÝ JIBAÒ>iªÏOâ¬ïv>h¯‘ßÖu>ðµÓ½ðE”Êb>2j¸Ž÷Ìí(atå²pÈX¤ìqG‰Øe¤[a¨! ï( Z ä…Ô œÈ±¨æ±HûªÅ½ˆyN­!ÓGŽçô¯tÖÛëšÀ0b¶C; u]…è‡#Qb i²¨£üzúBmMË=:êû¬ìÂåÈ |Kó‡¾à#r”—¾ôËáD%oÉ•ou”—R¹ÎUuØ sC6S˜B—+×Q¹²ÏÊ•›››=ák `!áíĉدÛ)-’E©š‚þ…Nßavǘ=QÇ}ÃýØïûË ½xúìªSš¢{ñô5¶ÄÂîó“LqïØùÀ^]YAŽÒI8 ™Û#>@á°dQìt¦öEï%ùÀñ ÙÒÕ?zöäôÉ»Ÿô< Þ¥ÑKû…Ž¸ËƒNÉuÃhÈ/ñè £äPð›Ðé’i?.€xØ,è$Cn¦ç¡PóSÚc2æ ü‡aµO-ÖãüCuÀùÀe¾‡UÛ Ce"¶?¥íÃýŸ´x&0œabŠišÞë¹G{.³'¥'½,Ð

These type of problems tend to happen due to two reasons:

  1. You’re database is wrongly configured, since it’s storing the information with the incorrect codification of characters.
  2. It’s showing the compressed page (using gzip), but the headers that are sent to the browser are incorrect.

In both cases we’re talking about problems in the server settings, so get in touch with the hosting provider and ask them to repair it (this is what you pay them for ?).

4. I configured WordPress on my computer and I can’t access the content

If you’re playing at home with an installation in WordPress and you want to access it “from the outside” (in other words, from another computer), many things can go wrong: the computers may be in different networks, there may be firewalls, the ports might be closed… so I’m afraid I won’t be able to provide a concrete solution to your problem. What I can do, however, is give you a list of the typical causes that may prevent your WordPress from being accessible from another computer and, from here, you can do some research on how to check them and solve your case ?:

  1. By default, Apache servers only listen to requests from the localhost. Check that you have your server configured to accept petitions from a “public” IP (this can be the IP from a local network, like 192.168.1.25).
  2. Sometimes the web server doesn’t boot up in port 80, but uses a different one. Make sure, or configure your server so that it uses port 80, or access your browser through the port you have configured.
  3. If your operating system has some sort of firewall, configure it so that it allows requests to your web server.
  4. If you want access from your public IP, you will have to configure the router so that it redirects the ports of the public IP to the local private IP of your computer. Here, you must take into account several factors, such as the fact that with protocols like DHCP, the local IP of your computer may vary, so you will have to consider using a fixed IP on your network.

5. I cannot install plugins, themes, upload new pictures to the gallery…

Another common error that we often encounter. In this case, it is possible that:

  1. You have ran out of of space in the server. Consider changing to the next plan or deleting old information, whichever you want. 
  2. The folder permissions are incorrect. Most of the hosting providers work on Linux systems, so the folders where they store the information have an associated owner, who has the permissions to add things to them. If, for some reason, the permits have been “de-configured” (because we uploaded things in FTP, for instance), it is possible that we cannot continue to upload things to that directory. In that case, the hosting provider usually includes some sort of button to “reset permissions”; if you can’t find it, get in contact with them and they’ll help you.
  3. You’re uploading the incorrect .zip. Another typical error that happens when we buy a plugin or premium theme, appears when we upload the.zip that we’ve been given and things don’t work. The problem is that the.zip you must upload is not that which is given to you, but the one inside that one. The marketplace where you bought the plugin or theme typically sends you a.zip file with varied information (licenses, permissions, etc.) and with the plugin or theme, again, in a.zip format inside. Therefore, you only have to decompress the .zip file that you’ve been given and upload what’s inside.

6. I’ve been hacked. What do I do?!

Breath and calm down. Yes, you have a serious problem that’s not easy to solve. But don’t fret, you’re not alone!

First of all, you have to make sure there are no corrupted files. This means not only “eliminating any additional files”, but you must also check that the files of WordPress itself haven’t been modified. If this was the case, I would do a diff (with a program such as meld, for instance) between your tree of directories of your installation and the one you download clean from WordPress.org.

If everything is ok, we have to look for the differences in wp-config.php and in wp-content (plugins, themes or uploads). Or, better said, we have to “start from scratch”. In other words, I recommend you get rid of all the plugins and themes you have and install them again, downloading them from WordPress.org (or from the marketplace where you bought them). This shouldn’t create any problem, since, in theory, you’ve never edited them manually; what you download from the WordPress repository is, for sure, going to be free of infections. The uploads folder is something more complicated to treat, since users can upload “anything” they want. The only thing I can tell you is to verify that there are no PHP, HTML… files, I don’t know what type of content you usually use, but in general there will only be images or media files.

Finally, we should check the database. For this, verify there isn’t any user registered on your WordPress that you don’t know (it could be the reason why you’re getting weird content). Also verify that no one has added users to the database. In fact, you could check if the “corrupted” index.php appears in the database; maybe it’s not actually uploaded, but there is some weird process that regenerates it.

The truth is solving something like this is slow and quite complicated, one doesn’t really know where or what to look for. If you don’t manage to solve it on your own, look for help from a security expert that can access your installation and help you out.

7. My problem is not any of the previous ?

This new list of problems is not intended to be exhaustive, so it’s possible that your problem is neither here, nor on the previous post. If this is your case, I recommend you have a look at the WordPress developers page, where they discuss different types of existing errors, since you may get lucky and your problem (together with its solution) may appear on there. If you still can’t find a solution, get in contact with your hosting provider; remember they’re there to help you in this type of situations (as I said, that’s why you pay them for, my friend).

In any case, and before saying goodbye for today, let me remind you of the importance of having backups available when facing these sort of unexpected events. If you don’t have any, you’ll end up learning a valuable lesson the hard way: backups can save your life! With them, you just have to “jump back in time” until recovering a clean and functioning installation. Take it seriously and make it your number one priority: find a hosting provider that offers backups or create them yourself, but don’t trust your abilities to solve problems without them.

And now, tell me, did I forget anything?

Featured Image by Andrew Magill.

Leave a Reply

Your email address will not be published. Required fields are marked *

I have read and agree to the Nelio Software Privacy Policy

Your personal data will be located on SiteGround and will be treated by Nelio Software with the sole purpose of publishing this comment here. The legitimation is carried out through your express consent. Contact us to access, rectify, limit, or delete your data.