Month: February 2020

How to avoid catching the flu in Thailand

Oddly enough, but to catch the flu Thailand is as easy to get sick as in cold countries. The hot climate is negatively compensated by very light clothing and ubiquitous “coolers”.

The following tips are very simple, but often we are not ready for elementary situations just because most of the time we live in a another climate.

Hazardous air conditioners

Sitting under the air conditioner is like sitting in a draft: you will definitely get sick. Moreover, even if the air conditioner is set to a rather high temperature, for example, 25 ℃, then it still blows with air with a much lower temperature.

If you are right under the air conditioner, try to change seats. If your room has air conditioning above the bed (this is a very bad location), then set the air speed to low, if possible, change the direction of air flow to left or right side.

Insidious drinks with ice

In Thailand, it is very common to drink drinks from the refrigerator by adding ice to them. Moreover, ice is very cheap – a large package can be bought for 8 baht. And any drink will be more expensive, water, teas, juices cost from 15 to 60 baht. Therefore, in some restaurants serving drinks is brought to the point of absurdity: a glass is fulfilled by the milled ice to the top and tea is poured into the remaining space between the ice. There is too little fluid and it is very cold. Very easy to get a cold with this soft drink.

Depending on the restaurant, you can ask not to put ice, or order a drink in a can/bottle – in this case, most likely, you will be served a full glass of ice and a separately closed can of drink.

Motorcycle: beware of falling and catch a cold on it

Wind at a speed of 90 km/h is considered very strong, and wind at a speed of 118.8 km/h is considered a hurricane. In ordinary life, we rarely encounter such fast winds. But think about this simple fact: when riding a motorcycle, you sweep through the air at the speed of a motorcycle. That is, if you ride a motorbike at a speed of 100 km/h, then this is equivalent to the fact that you are standing, and the wind blows at you at a speed of 100 km/h!

Fortunately, most of the year, day and night, is too hot in Thailand to catch a cold even with such a strong wind. But this is an additional insidiousness: people get a habit to ride pretty fast in very light clothes, and if it gets cold on some days (nights), the motorcycle driver is not ready for this.

At the top there is a thermometer with a temperature of 39 ℃, the cause of the disease: riding on a cool night, in which dew even fell.

Precautions are simple: warm clothing and slow speed. The slower you drive, the weaker the wind, and the warmer.

If caught in the rain in Thailand

The rains here are quite warm. But if you need to ride a motorcycle, then reduce the speed, because the cool wind is very dangerous in this situation.

Upon returning home, take a hot shower and drink hot tea.

Cold regions of Thailand

In northern Thailand, as well as in Laos (if you went there for a visa), it is noticeably colder at night and in the early morning than you could get used to in the rest of this very warm country. In the mountainous areas of Thailand (such as Kanchanaburi) it can be very cold at night. Use suitable clothing. If frozen, at 7-11 you can buy hot coffee and instant pasta and pour boiling water in the same place.


Do not be frivolous with colds and flu in Thailand: you can also get flu and fever. During my 5 years of life there, Twice I had a temperature of 40 degrees: the first time I came in Kanchanaburi to visit mother’s wife, I was frozen at night, and the second time I froze during a night motorcycle ride.

Bring the usual antipyretic tablets with you to Thailand: aspirin, paracetamol, or other medicines to relieve symptoms of the common cold. If you get sick, rest more and drink warm liquids, do not use air conditioning and do not drink ice drinks. Influenza in Thailand is generally more easily tolerated than in cold countries and usually passes in 2-3 days.

WordPress: A critical error occurred on the site – impossible to enter the control panel (SOLVED)

After updating the plugins in WordPress on my VPS server, the site stopped opening. And it was even impossible to open the control panel – a message was displayed during all attempts (you can see a screenshot in the header of this article):

A critical error occurred on the site. Please check the incoming admin mail for further instructions.

Learn more about debugging in WordPress.

That is, it is impossible to fix the error through the control panel – it is impossible to get there, not change the settings, and not roll back the changes.

I didn’t receive the mentioned email – because it’s an experimental VPS and the mail service is not configured there.

In general, it is impossible to open the control panel, I did not receive a letter in the mailbox, and even if I received it, what can I do if the control panel is not available?!

It would seem a stalemate. The WordPress forums recommend “look for where you have the PHP error log on your hosting (you can ask for technical support of the hosting if you yourself can’t find it), see what's there at the end of the file, critical errors are marked as Fatal”.

I opened the error log for this site:

tail -n 50 /var/log/httpd/

But it turned out to be completely empty (maybe for this host I did not configure something).

By the way, Apache error logs on Debian, Linux Mint, Ubuntu, Kali Linux and their derivatives are placed in the /var/log/apache2/* files. And the Apache logs on Arch Linux and derivatives are placed in the /var/log/httpd/* files. This is the default – in fact, the logs can be anywhere in the file system, check the settings for a specific virtual host.

What to do if you cannot log in to your WordPress dashboard

So, the strategy is as follows:

  • since the problem arose after the update, I need to find the ability to roll back updates
  • I do not have access to the WordPress admin area, so I have to roll back changes at the file system level
  • I don’t remember which plugin or theme was updated, as a result the site stopped working. Therefore, to find out which plugins have been updated, I will look at the timestamps, when folders and files were changed.

So, by default (this can be changed by the settings of the web server and individual virtual hosts), website files in Debian, Linux Mint, Ubuntu and their derivatives are stored in the /var/www/html/ directory. And with Arch Linux, site files are stored along the/srv/http/ path.

So, I go to the folder with the site:

cd /srv/http/

The plugin files are located in the wp-content/plugins/ folder, I run the ls command (shows the contents of the folder) with the options -l (list the files with file information) and -t (sort files in the list by time of change):

ls -lt wp-content/plugins/

And here is what I see:

Today, February 18th, only one folder was changed, it is sitetree. The solution is very simple – remove the sitetree plugin.

How to remove WordPress plugin without access to control panel

You can install and remove WordPress plugins simply by unpacking their contents into the wp-content/plugins folder or by removing files of a plugin in this folder. That is, I run the rm command:

rm -rf wp-content/plugins/sitetree/

It is dangerous to use the rm command on a working (production) server, so here is a description of the arguments:

-f	means ignore non-existent files and arguments, don't ask anything. Delete non empty folders
-r, -R, --recursive	means recursively delete directories and their contents

And… the problem is solved – the website is working, the entrance to the WordPress admin panel is open. The only change is that the sitetree plugin is no longer installed. But this does not matter, this plugin, after a long period of lack of updates, already had one unsuccessful update, as a result of which the links from the “All Articles”/“Site Tree” sections disappeared and on my more popular sites I already found an alternative to this plugin. That is, I do not need to figure out what exactly this plugin did not like in my server with PHP 7.4.

WordPress does not work after updating the theme

By the way, if the problem is caused by updating the theme, then you can view the last changed themes like this:

ls -lt wp-content/themes/

If the problem is caused by updating the theme, then you can delete the folder even with the current active theme, in this case, the site will stop working with something like this error:

The catalog of the theme "........" does not exist.

But this is not a very big problem – entering the WordPress dashboard will still be available and you can select and install a new theme in the Appearance → Themes settings.


Errors caused by updating website or web server components are rarely so serious that you need to remove everything and install/configure it again. Even if the site “doesn’t work at all”, just find the reason and fix it.

By the way, for Linux users, what I described, that is, the ls and rm commands are the most elementary things. But for Windows users, perhaps, even after reading, nothing is clear. It’s not even clear where to enter these commands. Therefore, I recommend that webmasters switch to Linux, this will help to better understand this operating system.

UPD: email ‘Technical problems occurred on the site’

I managed to get the email that was mentioned in the first error (I updated the same plugin on another site laugh):

Starting with version 5.2, WordPress can detect errors with plugins or a theme on the site and send you similar messages automatically.

This time WordPress found an error with one of the plugins - SiteTree.

First go to your website (https:/ and check all the visible problems. Next, go to the page on which the error occurred ( and check the visible problems on it.

Please contact hosting technical support to further diagnose this problem.

Most importantly, this post indicates the plugin that caused the problem. If you have access to the admin panel, then delete it.

But, as I described my situation, it may be that there is no access to the admin panel, and therefore the second part is especially interesting:

If your site is broken and you can’t log into the console normally, you can now use the special “recovery mode”, which will allow you to safely log into the console for further actions.

For security reasons, this link expires in 1 day. But do not worry, if the error occurs again after this time, a new link will be sent to you.

To solve the problem, you need the following information:

WordPress Version 5.3.2

Current theme: Asteroid (version 1.2.8)

Problem plugin: SiteTree (version 2.1)

PHP Version 7.2.23

That is, with the help of the sent link there is even a chance to go into a broken WordPress.

How to check if a package is installed on Linux Mint

All Linux distributions consist of the same components: kernel, display manager, graphical desktop environment, pre-installed programs. To make users somehow distinguish distributions from each other, their builders install different wallpapers and add their own programs.

Unfortunately, the desire of distributors to stand out and become more “friendly” to the user leads to ridiculous (let's say bluntly, idiotic) problems. And, most likely, you already guessed about it from the title of this article.

Any distribution that is derived from Debian uses the apt file manager. To find out if a particular package is installed, just use the apt search command and specify the package name:

apt search PACKAGE

For example, I am wondering if kernel headers are installed already:

apt search linux-headers-

Well, the command is poor, because there are many different kernels, let's issue a more specific one and ask the question “are the headers of the current kernel set”:

apt search linux-headers-`uname -r`

Can you answer whether this package is installed or not? In fact, the answer is present but not clear, because instead of the original program, the file /usr/local/bin/apt is used, which is a Python script using the aptitude (!) program, the output format is completely different from the one we are expecting.

The answer is in the very first column, where there is only one character. The meaning of the characters is as follows:

  • p, meaning that no trace of the package exists on the system,
  • c,meaning that the package was deleted but its configuration files remain on the system,
  • i, meaning that the package is installed, and
  • v, meaning that the package is virtual.

How to use apt instead of aptitude on Linux Mint

For many years I have been working with the apt program, and aptitude is not installed at all on many distributions derived from Debian. Therefore, the original apt program is much more familiar to me.

To use apt instead of aptitude, run a command of the form:

/usr/bin/apt search PACKAGE

For instance:

/usr/bin/apt search linux-headers-`uname -r`

Well, that’s exactly what I wanted, brief information about the package with the unambiguous inscription “[installed]”:

Always issue /usr/local/bin/apt is inconvenient, so the question arises, how to get rid of this idiotic Python script? It is enough to run the command:

sudo mv /usr/local/bin/apt /usr/local/bin/-apt

And now a program of the form:

apt search PACKAGE

will give exactly the result that you expect.

For instance:

apt search linux-headers-`uname -r`

If you want to return the script back, then simply run the command:

sudo mv /usr/local/bin/-apt /usr/local/bin/apt