Category: Linux
-
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…
-
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…
-
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…
-
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…
-
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…
-
WordPress troubleshooting
•
Issue: You are having trouble with your WordPress installation and can’t figure out exactly the issue. It may be that you are on a server and have limited visibility. Resolution: Save the following four lines, these are a MUST for those who are moving sites across platforms or to another…
-
Rewrite rule – Force HTTPS / Linux
•
Forcing HTTPS is very easy to do in Apache. The common command is to force everything to HTTPS. In your host file, under :80 make sure you have the following. At the same time, make sure you have :443 open and that your configuration is ready to host the new…
-
Centos 7 and firewalld to allow SNMP
•
We need to add a profile for SNMP to use UDP 161. Edit /etc/firewalld/services/snmp.xml <?xml version=”1.0″ encoding=”utf-8″?> <service> <short>SNMP</short> <description>SNMP protocol</description> <port protocol=”udp” port=”161″/> </service> 2. Reload the firewall: firewall-cmd –reload 3. Add it to the public zone: firewall-cmd –zone=public –add-service snmp –permanent 4. Reload the firewall again. It should…
-
Postfix outgoing address change
•
ISSUE: When you install Postfix, the default outgoing address on that server will be apache@machinename.local. RESOLUTION: To change the outgoing address or the FROM address from your mailings, make the following changes: edit the /etc/postfix/main.cf file change the mydomain field to your mail domain [mydomain = mydomain.com] Add the following…
-
CentOS cheatsheet
•
Add user to group: useradd -G <groupname> <username> Change password: passwd <username> Allow sudo access: visudo Server Hostname: /etc/hosts, /etc/sysconfig/network PostgreSQL: yum install postgresql-server postgresql-cli service postgresql initdb chkconfig postgresql on /var/lib/pgsql/data/pg_hba.conf (add “host all all 127.0.0.1/32 trust” near bottom of page) service postgresql start yum commands: remove install…