Skip to content

Instantly share code, notes, and snippets.

View dejanmarkovic's full-sized avatar
💭
WordPress development 24/7

Dejan Markovic dejanmarkovic

💭
WordPress development 24/7
View GitHub Profile
@dejanmarkovic
dejanmarkovic / WordPress debug log location
Created January 9, 2014 20:10
WordPress debug log location
wp-content/debug.log
@dejanmarkovic
dejanmarkovic / WordPress Custom debug.php
Created January 9, 2014 20:12
WordPress Custom debug.log function
if (!function_exists('write_log')) {
function write_log ( $log ) {
if ( true === WP_DEBUG ) {
if ( is_array( $log ) || is_object( $log ) ) {
error_log( print_r( $log, true ) );
} else {
error_log( $log );
}
}
}
@dejanmarkovic
dejanmarkovic / Error Logging via the htacess
Created January 9, 2014 22:04
Error Logging via the htacess file
# log php errors
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
php_flag log_errors on
php_value error_log /home/path/logs/php-errors.log
@dejanmarkovic
dejanmarkovic / import multiple databases from command line.sql
Created January 13, 2014 16:56
import multiple databases from command line
mysql -u root -p < /path/to/sql/frile/multiDB.sql
@dejanmarkovic
dejanmarkovic / MySql import from command line.sql
Created January 13, 2014 16:58
MySql import from command line
mysql -u root -p databasename < /path/to/sql/frile/DB.sql
@dejanmarkovic
dejanmarkovic / If authentication is redirecting on MULTI Site
Created January 16, 2014 19:56
If authentication is redirecting on MULTI Site
try disabling subdomain install
define( 'SUBDOMAIN_INSTALL', false);
@dejanmarkovic
dejanmarkovic / No package "package name" available
Created January 18, 2014 15:13
If you get No package "package name" available when installinga package
yum -y install php-pear*
if yum can't find pear go to etc/yum.conf ("It might be that there is a line that looks something like: exclude=php* Wich will prevent you from installing any PHP extentions.")
@dejanmarkovic
dejanmarkovic / yum.txt
Created January 19, 2014 18:06
yum.conf location
/etc/yum.conf
@dejanmarkovic
dejanmarkovic / update mysql5.1 to 5.txt
Created January 19, 2014 20:42
update mysql5.1 to 5.5 CentOS
NOTE: read the source first
Source: http://stackoverflow.com/questions/9361720/update-mysql-version-from-5-1-to-5-5-in-centos-6-2
yum install php-mysql5.5
yum --enablerepo=remi,remi-test install php-mysql php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml php-pecl-apc php-cli php-pear php-pdo mysql mysql-server --skip-broken
yum --enablerepo=remi,remi-test install mysql mysql-server
@dejanmarkovic
dejanmarkovic / CentOs get processor info
Created January 24, 2014 01:03
CentOs get processor info
more /proc/cpuinfo
Source: http://www.cyberciti.biz/faq/linux-display-cpu-information-number-of-cpus-and-their-speed/