How to disable the WordPress plug-in via MySQL

To disable all WordPress plugins via MySQL, you must:

1) Be sure to make a backup copy of the database.

2) Open the phpMyAdmin or MySQL client from the terminal:

mysql -u USER -p

3) Execute the SQL query (if necessary, specify the correct prefix wp_):

UPDATE wp_options SET option_value = '' WHERE option_name = 'active_plugins';

After that, all plug-ins will be disabled and you can activate them again one by one in the admin panel.

You can also temporarily disable the plugin by renaming the directory with its files, the plugins are in the /wp-content/plugins/ directory.

How to remove statistics from the main page phpBB

To remove statistics from the main page of the phpBB forum, comment out certain lines in the template file of the theme used.
Go to the template folder and open the file index_body.html in a text or html editor.
We find the following lines:

<h3>{L_STATISTICS}</h3>
<p>{TOTAL_POSTS} &bull; {TOTAL_TOPICS} &bull; {TOTAL_USERS} &bull; {NEWEST_USER}</p>

And comment them out:

<!-- <h3>{L_STATISTICS}</h3> -->
<!-- <p>{TOTAL_POSTS} &bull; {TOTAL_TOPICS} &bull; {TOTAL_USERS} &bull; {NEWEST_USER}</p> -->

After the changes in the files, you must clear the cache through the control panel or manually.

The list of users online, the legend of moderators and administrators, birthdays can be disabled in the control panel of the forum: “Home” -> “Server load“.

The page break in the HTML document

I had to somehow make an HTML check template for a thermal printer, which after each page can make a tape break.

Since the check should have been broken into two parts, I did not touch the first part, and put the second part in the div tag with the style:

<div style="page-break-before:always;">
PAGE 2
</div>

Style “page-break-before” determines the gap in front of the page, so before the second page the tape was torn, well, and at the end of the printing process, the printer itself is breaking according to the settings of the printer. You can also specify that the gap should be executed after the page: “page-break-after” or “page-break-inside” inside the page.

I will describe the meaning:
always (always adds a page break)
auto (automatically adds a page break if it is required)
avoid (forbids page break)
left (skips one or two pages so that the next page is even when printing)
right (skips one or two pages so that the next page when printing is odd)
inherit (inherits the value)

The page break style can be specified for example in the table:

<table style="page-break-after:always">
</table>

Either in CSS:

table { page-break-after:always; }

Updating phpBB 3.1.8 to phpBB 3.1.9

Today has updated the phpBB 3.1.8 forum to phpBB 3.1.9 with the automatic service pack.

Below I will describe the order of actions for the update:

1) Let’s make a backup copy of the files and the forum base.
In Linux, you can do this with commands:

sudo tar -cvjf backup_forum_files.tar.bz2 /var/www/forum/
mysqldump -u USER -h localhost -p BASE | gzip -c > backup_forum_base.sql.gz

2) Now you need to download the archive with the service pack “https://www.phpbb.com/downloads/#update”.

3) Unpack from the archive only install/ and vendor/ in the directory with the forum. If the install folder is located in the directory with the forum, it automatically turns off, that is, no one on it will not write and walk.
If the files were moved from the terminal, then the rights of the owner from which they moved could be set and the web server can not access them, so let’s specify the group and owner from which the web north is working:

sudo chown -R user:user /var/www/forum/install/
sudo chown -R user:user /var/www/forum/vendor/

4) Open the browser link to the forum by adding install to it, for example http://example.com/forum/install/.
Now it’s time to press Update and follow the instructions.

If you made changes in the code of some files and they are affected by the update, you will be informed about this and offered to choose which version of the files to leave, in my opinion it is better to put the new version from the update, and then make the changes after the update by comparing both files for example in Notepad++ with using the plugin Notepad++ Compare plugin which shows the differences in the code of files.