Backup daily WordPress Drupal Script

If you use Drupal or WordPress and you have a virtual Server with SSH Login you should set up a daily Backup Script to have a Snapshot of your Blogs if Hackers insert SQL Code Injections or hack PHP Sites. Cause you cant NEVER know every EXPLOIT of every used Plugin (here less plugins is more!)

Of course you can daily or hourly RESTORE AUTOMATIC by CRON your Blogs by OVERWRITE bad inserted STUFF!

Howto?

  • See later.. here .. sorry have current not enough time..

 

or read my Wiki for MYSQL and WordPress Help!

  • Daily or hourly restored Stuff makes it useless to hack your blog!
  • Mount /tmp and /var/tmp ALWAYS with option NOEXEC!!
  • disable user access to : find,wget,curl,fetch or other commands with chmod 000 (noexec)
  • at php.ini disable upload if not needed cause you use SCP to upload Files/Images
  • on Apache2 install mod_security2 to blog SQL Injections, Remark: Not all code is known by the plugin!

Google Webmaster Tools Twitter

Last Time i tried  to integrate a Twitter Timeline into my blog but i found out that this ranked down my blog on Google Webmaster Tools cause Twitter sub connected Servers blocking Google Webmaster Bot from reading the timeline by own robots.txt so i stopped using Twitter Integration to fix. 

No Webmaster want show non indexed Informations  and went back to the time of  stones.. Twitter fails..

WordPress: Useful Keyboard Shortcuts Editor

If you use WordPress you can speed up your blogging by using the WordPress Shortcuts:

Visual Editor:

Basics:

  • Ctrl + b = Bold
  • Ctrl + i = Italic
  • Ctrl + c = Copy
  • Ctrl + v = Paste
  • Ctrl + x = Cut
  • Ctrl + a = Select All
  • Ctrl + z = Undo
  • Ctrl + y = Redo
  • Ctrl + [number] = Insert heading sizes, e.g. CTRL+1 =

Advanced:

  • Alt + Shift + n = Check Spelling
  • Alt + Shift + l = Align Left
  • Alt + Shift + j = Justify Text
  • Alt + Shift + c = Align Center
  • Alt + Shift + d = Strikethrough
  • Alt + Shift + r = Align Right
  • Alt + Shift + u = Unordered List
  • Alt + Shift + a = Insert link
  • Alt + Shift + o = Numeric List
  • Alt + Shift + s = Remove link
  • Alt + Shift + q = Quote
  • Alt + Shift + m = Insert Image
  • Alt + Shift + w = Full screen distraction free writing mode
  • Alt + Shift + t = Insert More Tag
  • Alt + Shift + p = Insert Page Break tag
  • Alt + Shift + h = Rich text editor help

Plain Editor (Default):

  • Ctrl + c = Copy
  • Ctrl + v = Paste
  • Ctrl + x = Cut
  • Ctrl + z = Undo
  • Ctrl + y = Redo
  • Ctrl + p = Print
  • Alt + Shift + p = publish = “Save” or “Update” Page!!
  • Alt + Shift + f = Full Screen distraction free writing

WordPress: Enable Distraction Write Mode Editor

If you use WordPress, you perhaps switched off some features long time ago, once i missed was the Editor Fullscreen Mode where the Posting Paper only was shown.

To enable it again:

  • Login as User with Editor Rights
  • Enter on Browser Fullscreen (Firefox = F11)
  • Open with the Mouse the “Screen Options” Menu on the top right
  • There you find the switch to select on.
  • Now a “Cross Button” appear on the tools bar
Enable Distraction Writing WordPress
Enable Distraction Writing WordPress

See on the right site the “Cross Distraction Button”, click to cleanup the Editor.  The WordPress Borders are hidden.

Distraction Button WordPress
Distraction Button WordPress for Clean Full Screen Editor

 

 

WordPress: Get URL of all Posts

On a lot of  Blogs, Forum and Howto Pages i have read the Question: “How to get the URL of all WordPress Posts?”

If you dont want to use a external Plugin which can be a Security Hole in the CMS you can fix it with a small Workaround:

  • Login into WordPress as Blog Admin
  • Create a New cenral Categorie like “Howtos”
  • Now go to the Posts Page where all Content Pages can be seen as list
  • Here SELECT ALL and do Bulk Action “ADD” to the new Categorie “howto”

that’s it.. now all Posts listet like.. https://www.linuxonlinehelp.de/category/howto/

wordpress url of all posts blogroll
wordpress url of all posts blogroll

Remark:

  • If you create new posts, then do always add them to the Categorie “howto”

MYSQL: Default Basic Table Structure WordPress

If you use WordPress and have tested some plugins and removed them later, it is possible that you have much waste tables still inside your database.

  • First do Database Backup with MySQL DUMP
  • Then check it enter the mysql console as your mysql admin user and do:

$mysql -u mysqladminusername -p

mysql > use databasename;

mysql > show tables;

System echo:

+---------------------------+
| Tables_in_wordpressdatab  |
+---------------------------+
| wp_commentmeta            |
| wp_comments               |
| wp_links                  |
| wp_options                |
| wp_postmeta               |
| wp_posts                  |
| wp_term_relationships     |
| wp_term_taxonomy          |
| wp_termmeta               |
| wp_terms                  |
| wp_usermeta               |
| wp_users                  |
+---------------------------+
12 rows in set (0.00 sec)

If this default structure is seen the plugins tables are removed correctly.

If not do, delete waste tables with:

mysql > drop wp_old_plugin_table_name;

logout with “quit” and test the WordPress Blog with logins and handling.

Remark: You never know what changes plugins inside your database do, the authors are unknown by yourself! Less is more secure!

More Details of WordPress Tables Basics Details