Move wordpress blog to another domain

If you need to move wordpress from one domain to another you only need to make a simple search and replace.

First step

move your files to the new location, through ftp sftp ftps webdav ..

Second step

backup your database and move to the new server.

third step

upload a copy of Search and Replace Script and follow instructions

Setting up a Php Continuous integration environment in Centos 6

As part of my job I need to create a continuous integration environment for my develops in Php.

first I installed Gitlab and then I installed Jenkins using the web page tutorial ( ).

you need to have enabled EPEL repos and rpm Fusion repos聽 .

when you have Jenkins installed you will need install the needed packages open a root terminal and write:

yum install ant php php-phpunit-phploc php-pdepend-PHP-Depend.noarch php-phpmd-PHP-PMD.noarch php-phpunit-phpcpd.noarch php-phpunit-phploc.noarch php-pear-PHP-CodeSniffer.noarch php-phpunit-PHP-CodeBrowser.noarch

The next step is add the php template into Jenkins CI

  • cd /var/lib/jenkins/jobs
  • mkdir php-template
  • cd php-template
  • wget
  • cd ..
  • chown -R jenkins:jenkins php-template/
  • /etc/init.d/jenkins restart

now we can create a new php project based on the php-template 馃檪

Installing PhpUnderControl in Centos 6

PhpUnderControl is a way to use CI under

Step 1: Enable EPEL repo and Remi repo

yum install wget

rpm -Uvh

rpm -Uvh

enable remi repository editing file /etc/yum.repos.d/remi.repo


Step2: Install Java and other stuff

yum install unzip

yum install ant

yum install java-1.6.0-openjdk-devel

yum install php-phpunit-PHP-CodeCoverage.noarch

yum install phpdoc.noarch

yum install php-phpunit-phpcpd.noarch

yum install php-phpunit-phploc.noarch

yum install php-phpunit-PHPUnit.noarch


rpm -i php-pear-Console-CommandLine-1.1.3-3.el5.remi.noarch.rpm

yum install php-phpunit-PHP-CodeBrowser

yum install php-phpmd-PHP-PMD.noarch

yum install php-ezc-Graph.noarch

yum install git

yum install subversion

Step3: Download CruiseControl

cd /opt



mv cruisecontrol-bin-2.8.4 cruisecontrol


cd cruisecontrol

step 4 fix problem with JAVA_HOME

open with your favorite editor (vim, emacs, nano, pico, gedit …) and set JAVA_HOME value, your file begin聽 must look like this:

<br />
&lt;br /&gt;#!/usr/bin/env bash&lt;br /&gt;<br />
JAVA_HOME=&quot;/usr/lib/jvm/java-1.6.0-openjdk&quot;&lt;br /&gt;<br />
 #################################################&lt;br /&gt;<br />
 # CruiseControl, a Continuous Integration Toolkit&lt;br /&gt;<br />
 # Copyright (c) 2001, ThoughtWorks, Inc.&lt;br /<br />
&gt; # 200 E. Randolph, 25th Floor&lt;br /&gt;<br />
 # Chicago, IL 60601 USA&lt;br /&gt;<br />
 # All rights reserved.&lt;br /&gt;<br />

step 5

open needed ports

step 6

Download PhpUnderControl

cd /opt


mv 0.6.1beta1


mv phpundercontrol-phpUnderControl-04197bb/ phpundercontrol

step 7

Install PhpUnderControl over cruiseControl

cd phpundercontrol

cd bin

./phpuc.php install /opt/cruisecontrol/

Basic tools for analyze PHP Code

If you get enrollment into a new work to maintain聽 Php project with millions of thousands of聽 lines of code written these tools can be one of your best friends.

phploc: phploc is a tool for quickly measuring the size of a PHP project.

install on fedora 15:


yum install php-phpunit-phploc.noarch


phploc <php source code dir>

phpdcd: phpdcd is a Dead Code Detector (DCD) for PHP code. It scans a PHP project for code that is no longer used.

install on fedora 15:


yum install php-phpunit-phpdcd.noarch


phpdcd聽 <php source code dir>

phpcpd: phpcpd is a Copy/Paste Detector (CPD) for PHP code. It scans a PHP project for duplicated code.

install on fedora 15:


yum install php-phpunit-phpcpd.noarch


phpcpd <php source code dir>

if your project is enormous you will need another key tools: Hope, Faith and Hard Work

more info about these tools and more at