w3 total cache

Disabling w3 total cache:

edit the wp-config.php file

define (WP_CACHE’, true);
from true to false (i.e. define (‘WP_CACHE’,false);

Command line method of clearing w3 total cache:

delete files form the wp-contentw3tc/pgcache/ directory

http://www.frandimore.com/blog-setup/how-to-delete-w3-total-cache-properly/

Posted in Linux | Comments Off on w3 total cache

Add openstack.compute

git clone git://github.com/jacobian/openstack.compute
cd openstack.compute 
python setup.py build 

sudo python

Posted in Linux | Comments Off on Add openstack.compute

Find largest apache process

ps -ylC apache2 | awk ‘{s+=$8} END {print s/1024/(NR – 1)}’
ps -ylC httpd | awk ‘{s+=$8} END {print s/1024/(NR – 1)}’

To calculate mysql usage:

Calculate MySQL Memory Usage – Quick Stored Procedure

Posted in Linux | Comments Off on Find largest apache process

check for mod_pagespeed

curl -D- http://example.com | grep X-Mod-Pagespeed

shows all zeros if it isn’t installed

if it is installed,

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 966 0 966 0 0 723 0 –:–:– 0:00:01 –:–:– 1618

or alternately curl -D- http://example.com |less

should show something like:

Date: Fri, 07 Sep 2012 21:51:06 GMT
Server: Apache/2.2.3 (CentOS)

X-Mod-Pagespeed: 0.10.22.4-1633

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 966 0 966 0 0 723 0 –:–:– 0:00:01 –:–:– 1618

Posted in Linux | Comments Off on check for mod_pagespeed

subsys is locked

If you get this error when doing service {servicename} status:

{servicename} dead but subsys is locked

You need to remove the {servicename} lock file

rm /var/lock/subsys/{servicename}

Posted in Linux | Comments Off on subsys is locked

Checking whether a security cipher (ECDSA) is available

[root@ssltest test]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)
[root@ssltest test]# openssl version
OpenSSL 1.0.0-fips 29 Mar 2010
[root@ssltest test]# openssl ciphers -v | grep ECDSA

Posted in Linux, OPENSSL and TLS | Comments Off on Checking whether a security cipher (ECDSA) is available

hardcode the WordPress siteurl to dev.mysite.com

When creating a dev version of a wordpress site, put the following in your wp-config for an immediate fix:

define(‘WP_HOME’,’http://dev.mysite.com’);
define(‘WP_SITEURL’,’http://dev.mysite.com’);

Another option is to edit the wp_options table as follows:

select * from wp_options where option_name=’siteurl’;

update option_value set option_value=”http://newsite.com” where option_name = ‘siteurl’;

Posted in Linux | Comments Off on hardcode the WordPress siteurl to dev.mysite.com

Translating Apache’s SSL Cipher Suite Directive

You can translate that to a readable list of algorithms with this command: openssl ciphers -v ‘ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP’

Read more on this site: http://unhandledexpression.com/2013/01/25/5-easy-tips-to-accelerate-ssl/

Posted in Linux, OPENSSL and TLS | Comments Off on Translating Apache’s SSL Cipher Suite Directive

Timezones in MySQL

Timezone
[root@server02 ~]# date 
Fri Feb 24 02:11:38 CST 2012
MySQL time-zone:
mysql> show global variables like ‘%time_zone%’;

+——————+——–+

| Variable_name | Value |

+——————+——–+ 

| system_time_zone | CST |

| time_zone | SYSTEM |

+——————+——–+

2 rows in set (0.00 sec)

mysql> show variables like ‘%time_zone%’;

+——————+——–+

| Variable_name | Value |

+——————+——–+

| system_time_zone | CST |

| time_zone | SYSTEM |

+——————+——–+

2 rows in set (0.00 sec)

The MySQL timezone is inherited from the server’s timezone.

PHP timezone is CST (also inherited from the server timezone).

[root@server02 ~]# php 2>/dev/null


< ?php 
echo date_default_timezone_get(); 
?>

America/Chicago

Posted in Linux | Comments Off on Timezones in MySQL

testing your site

Here are a couple of websites you can use to verify whether the site slowness is common for most clients or just your local network.

http://host-tracker.com/
http://internetsupervision.com

Posted in Linux | Comments Off on testing your site