Wordpress page 1 of 3 for 29 posts

Had an idea to extract all the unique words from my blog post titles and sort and rank them by frequency. I used MySQL, sed, tr, grep, cat and a little bash script hacked together to do this. Here's the top 10 unique words in my blog post titles. Here's how I got to this... SQL Query select id,post_title from wp_posts where post_type='post' and post_status='publish' Bash Script The script splits each word into a new line and also removes any non-alphanumeric characters sh Continue Reading...

WP-BOFH

A small WordPress plugin to create a BOFH excuse using a shortcode anywhere on your WordPress website shortcodes are supported. Usage [[bofh]] Output Example [bofh] wp-bofhDownload Continue Reading...

Login to WordPress from Python

I've been trying to learn some Python and have been tinkering with the requests module. Here is how I am able to log into a webpage, such as WordPress. import requests url = "https://techish.net/wp-login.php" redirect_to = "https://techish.net/wp-admin/" with requests.Session() as session: post = session.post(url, data={ 'log': 'admin', 'pwd': 'password', 'redirect_to': redirect_to }, allow_redirects=True) get = session.get(redirect_to, cookies=post.cookies) Continue Reading...

WordPress TwentyTwenty Theme – Inter font Apache2 error

I'm testing out the development version of TwentyTwenty theme from WordPress on this site. I noted that calls to /assets/fonts/inter/Inter-upright.var.woff2 were causing some grief for Apache2 (Error 500): AH00681: Syntax error in type map, no ':' in /var/www/clients/client0/web1/web/wp-content/themes/twentytwenty/assets/fonts/inter/Inter-upright.var.woff2 for header wof2 Cursory Google search indicates that Apache2 is interpreting filenames with .var.* in the name as a Type Map. To Continue Reading...

WP Preserve Backslashes

I created a WordPress plugin based on a personal dilemma I ran into with my site being stripped of backslashes. Upon post save, it converts backslashes to HTML entity ] which is what will be stored in the database. The plugin is available on GitHub at https://github.com/rjkreider/wp-preserve-backslashesHere's the function if you want to just drop it in your functions.php file instead of installing it as a plugin. function wppb_keepbackslash($PostID) { $thePost = get_post($PostID); Continue Reading...

All my backslashes are gone in WordPress. Yikes.

Discovered that my most recent conversion from SQLite to MySQL seems to have screwed up my backslashes in all my posts that have backslashes. This is bad because my code snippets should not be copy & pasted and run at face value unless you verify the code!  It could seriously break shit. Ugh.  This is going to be a PITA to go and fix 500 posts.   It might be quicker to try to fix the SQLite DB file and try another conversion.  This isn't the first time I've noticed this problem.  Continue Reading...

WordPress SQLite to MySQL Migration Complete

Just finished migrating my website from SQLite to MySQL. What a rush. (lol) It was actually not as bad as I thought. A lot of sed, grep and other sorcery involved; especially in transforming of SQLite statements to MySQL. Some quick commands I used: sqlite techish.db .dump > production_2018-08-23.dump.sql I found that it used quotes for tables and column names, so I had to remove those first and foremost. sed -i '/INSERT INTO/,/VALUES (/s/"//g' production_2018-08-23.dump.sql Next Continue Reading...

WordPress Unauthorized Password Reset Vulnerability (CVE-2017-8259)

A vulnerability reported to WordPress in July 2016 was publicly released recently and identified as CVE-2017-8259.  The vulnerability could allow an attacker to gain unauthorized access to a victim's WordPress account. Continue Reading...

From Linux Install to WordPress

A typical installation of Debian 8.x (Jessie) precedes this where I only select base system and ssh server options during operating system installation. After installation, this is a typical configuration to get me up and running. These are my notes. Continue Reading...

WordPress 4.7.2 is Available for Update

Security vulnerabilities are addressed in WordPress 4.7.2. An XSS and SQL injection vulnerability (wp_query()) were discovered and have been patched.
Update your sites.