Blog

Zerif supports a custom frontpage

Cloudflare and WordPress multisite

Issue: Site uses Cloudflare and uses flexible SSL to serve pages. However, within WordPress, any http:// referenced sources are being referenced as http:// instead of https:// Solution 1: For the site in question, you can force resources to automatically upgrade. Put the following line in your .htaccess file: Header always set Content-Security-Policy: upgrade-insecure-requests An explanation Read more about Cloudflare and WordPress multisite[…]

WordPress/MySQL change URLs

Connect to MySQL and view tables to see what you need USE <DB_NAME>; SHOW TABLES; Grab site URLs SELECT * FROM wp_options WHERE option_name = ‘home’; SELECT * FROM wp_options WHERE option_name = ‘siteurl’; **NOTE** Multisite setups are different. Each site has their own set of wp_options, depending on your site, it may be set Read more about WordPress/MySQL change URLs[…]

Malware/Hack on website, what to check?

Issue: Site hacked, payload dropped, compromised. How, where to go, and what to do. FIRST: Resolve and remove the offending content– Restore your website from good backups– Double-check your files, if it’s a CMS (like WordPress), try to restore from the original install files and ONLY bring in necessary files (ie. wp-content/themes/plugins folders, etc.)– scan Read more about Malware/Hack on website, what to check?[…]

WordPress can’t connect to database after MySQL move to new datadir

Resolution: The problem is related to your moving the mysql.sock file to a new location. PHP needs to know where it is, changing the location will fix the problem and reload apache/httpd (if you are using php-fpm, restart the service) Easy fix: Edit your php.ini file and make sure you specify the new mysql.sock location. Read more about WordPress can’t connect to database after MySQL move to new datadir[…]

Moving mysql datadir in Redhat (don’t forget SELinux!)

Issue: You have moved /var/lib/mysql data files to their new destinations, but mysql will not start up. Resolution(s): 1. Review and verify configurations (in this example, MySQL 8) – /etc/my.cnf.d/mysql-server.cnf datadir=/ & socket=/ set to the right folder? – /etc/my.cnf.d/client.cnf add the following lines under [client]: datadir=/path/to/your/files port=3306 2. Grant SELinux permissions to the new Read more about Moving mysql datadir in Redhat (don’t forget SELinux!)[…]

Connection errors from WordPress to Azure MySQL database

Issue: You are getting connection issues to your hosted Azure MySQL database server. You are putting the correct information in, but still WordPress is showing Error Connecting to Database. Error: After some investigation, you most likely are getting this error: mysqli_real_connect(): (HY000/9002): SSL connection is required. Please specify SSL options and retry Resolution: Believe it Read more about Connection errors from WordPress to Azure MySQL database[…]

Script for Chrome cache multiple users

I found a script this very useful script. It does a good job of cleaning the Chrome cache in user profiles on a terminal server. Original Post: https://community.spiceworks.com/topic/1425012-clear-chrome-cache-for-multiple-users-on-file-server Thanks! ======== @ECHO On TASKKILL /F /IM Chrome.exe /T for /f %%a in (‘dir c:\users /b’) do ( rd “c:\users\%%a\AppData\Local\Google\Chrome\User Data\Default\Cache” /s /q del “c:\users\%%a\AppData\Local\Google\Chrome\User Data\Default\*history*.*” /s Read more about Script for Chrome cache multiple users[…]

Script for disk cleanup

@echo off REM Install Disk Cleanup based on Windows Version ver | findstr /i “6\.0\.” > nul IF %ERRORLEVEL% EQU 0 goto ver_2008 ver | findstr /i “6\.1\.” > nul IF %ERRORLEVEL% EQU 0 goto ver_2008R2 goto warn_and_exit :ver_2008 :Run Windows 2008 specific commands here echo OS Version: Windows 2008 IF NOT EXIST “%SYSTEMDRIVE%\Program Files Read more about Script for disk cleanup[…]