We need to install the following things in the server to run the Python test scripts after WordPress auto update:

  1. Need to be installed Python 2.6.x or 2.7.x
  2. Install WP CLI, see detail: http://wp-cli.org/
  3. Install pip:For RHEL 6.x and CentOS 6.x (x86_64)
    rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

    For RHEL 6.x and CentOS 6.x (i386)

    rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

    Now install pip with yum command:

    yum install -y python-pip

    If you can not install pip be following the above steps then try the below steps:

    curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
    python get-pip.py
    
  4. Install Selenium:
    pip install selenium
    
  5. Install python-detenv:
    pip install python-dotenv
    
  6. Install python requests library:

    pip install requests
  7. Download Phantomjsfrom:http://phantomjs.org/download.html
  8. Copy Phantomjs to /usr/local/share/:
    cp -f phantomjs /usr/local/share/phantomjs

    Note: Keep the phantomjs nonexecutable while the wp-auto-update will run the script will make it executable and make it nonexecutable once it’s done.

  9. Make symlinks of Phantomjs:
    ln -s /usr/local/share/phantomjs /usr/local/bin/phantomjs
    ln -s /usr/local/share/phantomjs /usr/bin/phantomjs
    
  10. Install additional dependency for Phantomjs:
    yum install freetype
    yum install fontconfig
Advertisements