Latest Posts

How to manually change your theme through the command line in wordpress

Access MySQL Server from the shell prompt OR Open phpMyAdmin, go to your wp database.

$ mysql
$ use database_name;
$ show tables;

You will see something like this:

 +————+————+————+—————+—————+
 | Tables_in_database |
 +————+————+————+—————+—————+
 | wp_commentmeta           |
 | wp_comments              |
 | wp_links                 |
 | wp_options               |
 | wp_postmeta              |
 | wp_posts                 |
 | wp_term_relationships    |
 | wp_term_taxonomy         |
 | wp_terms                 |
 | wp_usermeta              |
 | wp_users                 |
 +————+————+————+—————+—————+
 11 rows in set (0.00 sec)

Checking current theme:

select * from wp_options where option_name = 'template' or option_name = 'stylesheet' or option_name = 'current_theme';

You will see something like this

 +———–+—————+————–+———-+—————+—————+—————+—————+—————+—————+
 | option_id | option_name   | option_value     | autoload |
 +———–+—————+————–+———-+—————+—————+—————+—————+—————+—————+
 |       149 | current_theme | themename        | yes      |
 |        45 | stylesheet    | themename        | yes      |
 |        44 | template      | themename        | yes      |
 +———–+—————+————–+———-+—————+—————+—————+—————+—————+—————+
 3 rows in set (0.00 sec)

Changing current theme ‘themename’ to ‘twentyeleven’

update wp_options set option_value = ‘twentyeleven’ where option_name = ‘template’ OR option_name = ‘stylesheet’ OR

How to block Facebook, Twitter, Youtube on a Mikrotik

How to block / drop Facebook http and https

/ip firewall filter add chain=forward src-address=192.168.1.0/24 protocol=tcp dst-port=80 content="facebook" action=drop comment="Block Facebook HTTP"

/ip firewall filter add chain=forward src-address=192.168.1.0/24 protocol=tcp dst-port=443 content="facebook" action=drop comment="Block Facebook HTTPS"


How to block / drop Youtube http and https

/ip firewall filter add chain=forward src-address=192.168.1.0/24 protocol=tcp dst-port=80 content="youtube" action=drop comment="Block Youtube HTTP"

/ip firewall filter add chain=forward src-address=192.168.1.0/24 protocol=tcp dst-port=443 content="youtube" action=drop comment="Block Youtube HTTPS"


How to block / drop Twitter http and https

/ip firewall filter add chain=forward src-address=192.168.1.0/24 protocol=tcp dst-port=80 content="twitter" action=drop comment="Block Twitter HTTP"

/ip firewall filter add chain=forward src-address=192.168.1.0/24 protocol=tcp dst-port=443 content="twitter" action=drop comment="Block Twitter HTTPS"