How to change a WordPress theme through MySQL

To change the WordPress theme via MySQL, first see what theme is specified at the moment, for this, execute the SQL query via phpMyAdmin or MySQL client:

SELECT * FROM wp_options
WHERE option_name = 'template'
OR option_name = 'stylesheet'
OR option_name = 'current_theme';

Next, see what themes are in the /wp-content/themes/ directory.

For example, to change to the standard Twenty Fifteen theme, let’s execute three SQL queries:

UPDATE wp_options SET option_value = 'twentyfifteen' WHERE option_name = 'template';
UPDATE wp_options SET option_value = 'twentyfifteen' WHERE option_name = 'stylesheet';
UPDATE wp_options SET option_value = 'Twenty Fifteen' WHERE option_name = 'current_theme';

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; }