Sunday, 19 November 2017

Set Up Wordpress CLI Tool On Centos 7 RHEL

Wordpress CLI tool is very useful for performing many tasks associated with Wordpress development and administration. its easily installed and configured if your system meets the minimum requirements.

So make sure your system meets the minimum requirements before installing it.

UNIX-like environment (OS X, Linux, FreeBSD, Cygwin)

PHP 5.3.29 or later

WordPress 3.7 or later

Once you've established these, download the wp-cli.phar file using curl or wget.

$ curl -O

Check it with the following command.

$  php wp-cli.phar --info

Make it executable and move it into your path so you can use the wp command.

$ chmod +x wp-cli.phar

$ sudo mv wp-cli.phar /usr/local/bin/wp

Run a command to check its installed properly

$  wp --info

PHP binary:    /usr/bin/php
PHP version:    7.0.25
php.ini used:    /etc/php.ini
WP-CLI root dir:    phar://wp-cli.phar
WP-CLI vendor dir:    phar://wp-cli.phar/vendor
WP_CLI phar path:    /home/anton
WP-CLI packages dir:   
WP-CLI global config:   
WP-CLI project config:   
WP-CLI version:    1.4.1

Check out the quick start guide at

to get started with it.

That's it!, you can now use the wp-cli tools for many tasks associated with Wordpress.

Set Up Virtual Hosts for Apache On Centos 7 RHEL With Extra File And Folder Permissions

Many of us don't have computers powerful enough to run some of the Virtual Machine and Container solutions out there properly for developing applications, or prefer to use a traditional server on the host machine for this purpose.

Here we look at a solution for setting up extra VirtualHosts on a standard Linux (Centos 7 or RHEL) machine using Apache Web Server, which is expandable, ie, you can create extra Virtual Hosts as you require by repeating many of the same steps.

This is extremely useful in many scenarios and as you can create as many VirtualHosts as you want and you can set up a different one for every development environment you are using. Assuming you are not at high security on your machine, below is all you need to do, if not there may be extra steps to perform which are not covered here.

It is assumed that you have the standard Apache (Httpd) installed and running correctly at the usual localhost  (probably port 80) with default folders at /var/www/html for RHEL or Centos.

There are plenty of tutorials for setting that up online, if you do not, then do this first!

PHP is not necessary for a VirtualHost but I've added a  bit for users who want to check that is working also, if they have it.

We will be setting up a new Virtual Host and domain name with its own folders and permissions for easy access to them from your desktop without having to use sudo . 

You can also use this tutorial to change the permissions and access location for your existing /var/www/html folders even if you are not setting up a Virtual Host by following steps 2-8 after first creating the new group www-data  and adding the users apache and user, as in the preliminary task immediately below.
If you are setting up a new VirtualHost then use steps 1-14 after this.

Preliminary Task.

The first task is to set up a new group called www-data, so that both you and apache can access and change files without you having to use sudo all the time.

So create a new www-data group and add users and apache to it.

$ sudo groupadd www-data

Add the users to group

$ sudo usermod -a -G www-data anton (change anton for your user)
$ sudo usermod -a -G www-data apache

Check it with

$ groups apache anton (change anton for your user)

Should show both you and apache as users for the new group.

You only have to do the above once regardless of how many virtual hosts you are setting up and its probably a good idea to do it on just a standard apache install anyway.

Primary Tutorial 

(2-8 for standard apache access, change to html, or 1-14 for full VirtualHost setup read verbatim)

Now set up the directory for the new vhost server and files

1. $ sudo mkdir -p /var/www/

The permissions, we fix these so that both apache and user have access to change files, so change the group of this directory to the new www-data group and allow apache access to read & write files.

2. $ sudo chgrp -R www-data /var/www/
3. $ sudo find /var/www/ -type d -exec chmod g+rx {} +
4. $ sudo find /var/www/ -type f -exec chmod g+r {} +

Now change ownership to your user so you can also read & write files easily.

5. $ sudo chown -R anton /var/www/   (change anton for your user)
6. $ sudo find /var/www/ -type d -exec chmod u+rwx {} +
7. $ sudo find /var/www/ -type f -exec chmod u+rw {} +

Now create symlink to your desktop for easy access to add and alter files, you don't now need to use sudo.

8. $ ln -s /var/www/ /home/anton/Desktop  (change anton for your user)

(Optional, repeat steps 2-8 on your existing standard apache folder at /var/www/html for parity, just change to /html, these will also add that folder to the desktop with the new group and user permissions) so you can have your standard folder set up plus the new VirtualHost folder as well, (and any you add later) all on your desktop)

To finish this part, add an index.html file into directory (now its on your desktop) with below contents.

    <title>Welcome to!</title>
    <h3>Hello, your virtual host is set up correctly.</h3>

Optional, you can also add a phpinfo page to check your php details, create a php file in directory called info.php with the usual php function in it.

You can check this when you've finished the set up, but first we set up the VirtualHost. 

We will need to set up the directory that  all the virtual hosts will be stored in, as well as the directory that tells Apache that a virtual host is ready to serve. The sites-available directory will keep all of our virtual host files, while the sites-enabled directory will hold symbolic links to virtual hosts that we want to publish. 

Make both directories with:

$ sudo mkdir /etc/httpd/sites-available
$ sudo mkdir /etc/httpd/sites-enabled

You dont need to set any permissions on these, just leave as is & you only need to do it once regardless of how many VitualHosts you are setting up.

Now tell Apache to look for virtual hosts in the sites-enabled directory. To do this, we will edit Apache's main configuration file and add a line declaring an optional directory for additional configuration files:

$ sudo nano /etc/httpd/conf/httpd.conf

Add this line to the end of the file:

IncludeOptional sites-enabled/*.conf

(Only once for the above)

Now set up the first VirtualHost file, it has to end in .conf

9. $ sudo nano /etc/httpd/sites-available/

Into this file add the VirtualHost directive as below

<VirtualHost *:80>

Now add the document root which is the directory you created earlier, and optional logs

 DocumentRoot /var/www/
 ErrorLog /var/www/
 CustomLog /var/www/ combined

So the final file looks like this.

 <VirtualHost *:80>
    DocumentRoot /var/www/
    ErrorLog /var/www/
    CustomLog /var/www/ combined

Now enable the file and site for apache to find and use,
11. $ sudo ln -s /etc/httpd/sites-available/ /etc/httpd/sites-enabled/

This creates a symlink to the file in sites-available inside the sites-enabled folder you created earlier.

Now find your Ip address for your machine with

$ ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v ''

Add it to your /etc/hosts file along with the name of your new VirualHost server.
12. $ sudo nano /etc/hosts

Add the line as below   (change for your ip and virtual host server name.

Restart apache
13. $ sudo service httpd restart

14. Browse to your new server/site using

Optionally, check your php details by browsing to the info.php file if you created it.

You can repeat steps 1-14 for every extra VirtualHost you want to set up, just change the values ie, to and so on.

You don't have to create the index.html files or info.php files but it is recommended so you can check the site is working properly.

(Technically, this adds 2 extra steps to 1-14 above!)

So the above should work on most Centos 7 RHEL machines as is, and some other Linux distros depending on the apache installation path and folder locations which you may have to alter for those distros.

Hope it helps!

Sunday, 12 November 2017

Make A Translucent Back To Top Button For Responsive Web Site or Mobile App

Whilst there are plenty of options if you want to put a back to top button on your website, many of them use external SVG or other type image files for the marker image.

You can add a responsive translucent Back To Top button which becomes just visible as site visitor starts scrolling down the page easily with a few lines and just a button element with a Font Awesome icon.

While I used a Bootstrap container in this example, it works fine on standard html pages as well. Also useful for mobile apps if the framework you are using doesn't have one.

Start with the html page, just a standard page including the Font Awesome CDN link, and links to your app or main js and style css files.

1. HTML Page
code starts like this.

 <doctype html="">
<html lang="en">

<title>Back To Top Translucent Button</title>
<!--Bootstrap just for aesthetics-->
<link crossorigin="anonymous" href="" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" rel="stylesheet"></link>
<!-- Font Awesome for the button icon-->
<link href="" rel="stylesheet"></link>
<!--style for the button-->
<link href="css/style.css" rel="stylesheet"></link>
<div class="container">
    <div class="jumbotron">
        <h3 class="text-center">
        Floating translucent back to top arrow for long or short pages using standard js &amp; Font Awesome
<div class="blockquote">
         Page content, put it in here or a lot of lorem ipsum to test it out.

<!--Add Button and FA icon with id topBtn-->
<button id="topBtn" onclick="topFunction()" title="Go to top"><em class="fa fa-2x fa-chevron-up"></em></button>
<!-- Main JS -->
<script src="js/main.js"></script>

Button has an onclick topFunction and a FA icon which can be changed and resized.

2. Add the css to style the button in your linked stylesheet file

#topBtn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  border: none;
  outline: none;
/*Optional color the button
  color:rgba(128, 128, 128, .7);*/
#topBtn:hover {

The button is fixed to the bottom right of page with transparent background, this will show a solid button icon image which you can make translucent by optionally using the included rgbs settings with the last value say somewhere between .4 to .7.

3. Add javascript functions for the scrolling and clicking actions in your linked js file.

 window.onscroll = function() {scrollFunction()};
      function scrollFunction(){
        /*Change timer to suit page size*/
          if (document.body.scrollTop > 1000 || document.documentElement.scrollTop > 1000) {
              document.querySelector("#topBtn").style.display = "block";
          } else {
              document.querySelector("#topBtn").style.display = "none";

      function topFunction() {
          document.body.scrollTop = 0;
          document.documentElement.scrollTop = 0;

The timer can be adjusted according to page content size and set for the button to start appearing as the user gets further down the page.

Button appears unobtrusively at bottom right . It doesn't  actually need bootstrap css or js, nor jQuery to work fine.

Clone the code example at

A nice easy to implement back to top button.

Tuesday, 11 July 2017

Open Table iPhone App, 5 iPhone Apps To Save Money & Acast Podcast Network Crings CarPlay To iPhone App.

Train To Build iOS Apps, 11 iOS Features & Touch Friendly Controls In Chrome OS.

Get The Most From iOS 11, Warchant Offers Free App For iPhone And Android & The Best Of iOS 11 On iPhone.

How To Make Animated GIFS Of iPhone Screen, Paid Apps For Free & Twitter For Android.

iOS Camera New Features, Softorino You Tube Converor & Ulysses Writing App For iOS.

Airmail iOS App Makes Managing Email Easier, iOS 11 Review & Apps That Dont Work On iOS 11.

How To Sync Android With Windows 10, iOS 14 Smart Software Review & iPad/iOS 11 To Replace Computer.

Best Paid Apps For iOS, An iOS App to Create An Ambient Music Masterpeice & Document Scanner For iOS 11.

People Dependant On Mobile Apps, You Tube Resizes Videos To Fit Any Screen & Mint App Review.

Java For Mobile App Development, 4 Development Methods & Tech In The Digital Age.

A Look At 10 Years Since iPhone Release, 12 Top Apps For Android & Redfin Run Single Server With No Backup.

Facebooks Mobile App Is Complicated, Mobile App Development Lessons & Google Mobile Search Summary.

4 Reasons For Mobile Apps, 1.6 Trillion Hours Spent On Mobile Apps & What Do Users Expect In An App.

10 Things In Tech You Might Want To Know, 5 iPhone 8 Rumours & Apple Release macOS High Sierra Beta For Developers.

iPhone 8 Versus Galaxy 8 Standoff, Galaxy Released & iPhone 8 Reveals Big Change.

13 Great Features Of iOS 11, 10 New Apps For iPhone And iPad & New Features in iOS 11 Bring Multitasking.

Installing Countly Analytics In Centos and Debian, Bash Prompt Tips and Tricks & OpenBSD Gets Unique Kernels On Reboot.

Hotspot GUI Performance Profiler, Debian Jessie Released & Fedora 26 Final Released.

Sunday, 9 July 2017

Fedora 19 Desktop Edition Released, Installing Hbase Database Server On Ubuntu & Cinnamon 2.0 New Release.

Ubuntu Launches On Mobile, 5 Best Alternative Window Managers & Dell Precision 7520 DE Ubuntu Laptop.

Antergos User Friendly Desktop, Linux Media Center Software & Azure Files Storage Errors On Windows.

Raspian GNU/Linux New Release, ChromeOS Touch Controls Beta Available & Beginning Android Development.

Linux Systemd Vulnerable To DNS Attack, Pop!_OS and System76 & Is Android Really Just Linux ?.

Linux Program For Power Users, Installing SnipeIT On Centos And Ubuntu & Linux and macOS Malware Threats Tripled.

Bash Tips And Tricks, Google Release A Samba Client For Android & Configuring Gzip With Nginx.

Fish Shell Simplifies Linux Commands, Plex Status Displays On PiTFT Screen & Kubernetes 1.7 On Ubuntu.

Installing MariaDB On Centos 6, 8 Open Source Libraries For iOS & Zip Bombs On Vulnerability Scanners.

Installing Webmin On Debian 9, Installing a PXE Server On Centos 7 & Fedora Switch From Yum To DNF.

Friday, 7 July 2017

Apple Release OS X 10.11 El Capitan Open Source Darwin Code, Epic Games Supports Blender Development & JabirOS Review.

Skype Mobile App Annihilated By Users, Get 1 Million Downloads For Your Mobile App & What Mobile Users Expect From An App.

Debian 9 Gets Security Upgrades, Cloud Commander File Manager & Learn Linux In One Week.

Openfire Server Administration, Switching to GNU/Linux & Installing Wireless Drivers On Opensuse.

Analytics Made Easy With Watson Analytics, FirewallD On Centos & VirtualBox Download For Oracle Enterprise Manager 13.1.

Installing Wallpapers In Fedora 26 & 11 Things To Do After Installing Fedora 21 And Fedora 22.

Tutorials On Installing Oracle Database On Centos 7, Installing Samba 4 On Centos 7 & Installing Vagrant On Centos 7.

Maru Brings Debian To Smartphones, Debian Offers Improved Security & Debian Retires FTP Services.

Linux Mint 18.2 Review, Ubuntu For Desktops & Installing LEMP On Debian Stretch.

Linux Homes For Unity Orphans, Ubuntu Unity Dead & Manjaro Linux Installation.

Ubuntu Reaches End Of Alphabet With Zesty Zapus, Building Android Apps On Debian & Installing Debian Stretch.

Friday, 30 June 2017

Ubuntu Kill Off Unity Desktop, 3 Cool Features In Ubuntu & Setting Up An Open VPN Server On Debian.

Linux On An Asus X540S Notebook, System 76 New OS For Linux Professionals & Slashicon Icon Theme Available For Ubuntu And Mint.

Free Monitoring Tools For Linux, Open Source Tools For Admins & Malware Detection On Centos 7.

Best Linux Distributions for Small Business, Zimbra Collaboration Suite On Centos 7 & Install Wordpress Using Apache/Nginx On Cenos and Fedora.

Using Cron For Scheduling Tasks, Linux On Azure & Intel Core i9 7900X Review.

Dreamcast Gaming Tutorial, Best Linux Distributions Rated By Experts & Top 10 Best Linux Applications.

Windows 10 Gets Suse Server, Monit On Ubuntu and Debian & Dell Precision 5520 Developer Edition Workstation.

Wednesday, 28 June 2017

Best Android Phones To Buy, Razer Release Android Nougat For Nextbit Robin & Top 10 Android Stories.

LG X500 Announced, Android Nougat Usage Doubles & Moto Z2 Play Arrives.

ZTE Axon 7 Mini Gets Android Nougat, Widgets For Android & Kotlin For Android Development.

Facebook App For Android, Samsung J Series Update & Nvidia Sheild V Amazon Fire V Roku Ulte Comparison Test.

Sony Xperia XA Ultra Gets Android Nougat, Android Apps Support Chromebooks & OnePlus 5 Kernel Source Available For Download.

OnePlus 5 Delayed Release, Moto Z2 Available In India & Samsung Smartphone Unlocks Windows 10 PC.

Amazon To Release Android Smartphone, Samsung Galaxy J5 & J7 & Lenovo Moto E4 Release.

The Best Used Android Phones To Buy, OnePlus 5 In India & Samsung Chromebook Plus Release.

Sony Experia Ultra XA Gets Android Nougat, 5 Most Popular Android Apps & Samsung Galaxy S8 Smartphone.

Crossover For Android Alpha 4, Kotlin With android Studio & ZTE Axon 7 Update To Android 7 Nougat.

Samsung Chromebook New Release, Meizu Update 10 Smartphones To Android Nougat & Lenovo Tab 4 Debuts In USA.

Tuesday, 27 June 2017

Android 7 Nougat Update For Lenovo K6, Android Pay Hits Canada & Motorola Launch Moto C Smartphone In India.

Sony Smartwatch 3 Review, Android Apps Support For Chromebooks & Creating Playlists In Kodi.

Asus Zenpad 3S Release, Android Lollipop For The Indian Market & Best Affordable Smartphones.

Top 10 Android Stiories, Plex Live TV & The Best Android Phones To Buy. in 2017.

The Essential Phone Versus iPhone, Android O Developers Preview & Twitter Redesigns Android App.

Xavier Malware on Android, Cortana Assistant & 8 Ways To Make Your Android Less Annoying.

How To Get iPhone Messages On Android, 5 Popular Android Applications & Plex Updates For Android.

The Android Versus iPhone Debate, Common Mistakes Of App Developers & Widgets For Android.

News On 60 New Banks For Android, Kotlin For Android & 5 Android Apps To Try.

Monday, 26 June 2017

Google Updating Android With Onscreen Security Notifications.

An In Depth Look At Googles Pixel Android Smartphone.

How To Install Googles Pixel And Pixel XL On Your Android Marshmallow Smartphone.

A Comparison Test Between Google Pixel And iPhone 7.

How To Check If Your Android Operating System Is Infected With Malware.

Switching From Windows To Zorin OS 8 Linux Distribution.

A Critical Bug Leaves Linux And Hundreds Of Apps Open To Eavesdropping.

A Look At The Factors Driving Mainstream Desktop Linux.

Indian Banks Switch To Linux After Support For Windows XP Ends.

Top 10 Linux Disributions for Privacy And Security.

A Look At ReactOS Linux Which Runs Native Windows Applications And Gets BSOD Errors.

Gnome Boxes 3.16.1 Released To Faciltate Installation Of Windows XP.

VMWare Photon Operating System Is Container Friendly.

Set Up Your Own VPN With PPTP On Centos Ubuntu Debian Linux.

Install Git And Set Up Git Account In RHEL Centos And Fedora.

Installing Supplemental Wallpapers In Fedora Linux.

Installing Centos 7.3 Linux Distribution.

Using Centos Web Panel AIO Free Web Hosting Panel For Centos 6 Linux.

Using Vagrant vSphere And Centos 7.

Using DCIM Open Source Data Management Tool.

Control Network Traffic Using Squid Cache And Cisco Router.

How To Find The Best Linux Distribution For Your Hosting.

Installing Docker With Ubuntu Centos 7 And Mint 17.

Installing A Datascience Server In Centos 7 Linux.

Installing VirtualMin On Centos Linux.

How To Install A Mumble Server In Centos 7 Linux.

Fedora To Centos Consistency And Transparency In Open Source Linux.

How To Install Wordpress Using Apache Or Nginx In Centos And Fedora.

How To Create A New Domain Account With Centos Webpanel.

Using vSphere And Photon OS With Integrated Containers.

How To Run Android Apps On A Linux Operating System.

Installing An FTP Server On Centos 7.

Configuring A Static IP Address In Linux And Unix.

Webmin 1.801 Released For Centos And RHEL.

AMD Produce An Open Source HSA Kernel Driver For Linux.

Mozilla Launches Focus IOS Content Blocker Based On An Open Source Blocklist.

Push 2 Hardware Now Works On Bitwig In Linux.

Four Ways To Generate Vector Graphics Automatically With Inkscape In Linux.

Crossover Linux Makes It Easier To Install Windows Programs.

Ubuntu Smashes Mac OS X In Benchmark Testing On Macbook Air.

Using Network Block Device For Faster Network Sharing In Linux.

Using BTRFS Error Recovery Features In Linux Systems.

Using BTRFS and Opensuse on a Laptop.

A Look at Kali Linux Advanced Penetration Testing Distribution.

Using UnrealIRCD IRC Server.

MediaTomb UPnP MediaServer For Linux.

A Look At Openfire Server For Linux.

A Free USB Redirector For Linux And Windows.

Using USB Over Network With Xenserver 6.

Horde Groupware Collaboration Suite.

Zabbix Enterprise Monitoring Solution.

Spacewalk Free Open Source Systems Management.

Sunday, 25 June 2017

Fedora 25 Makes It Easier To Switch From MacOS or Windows 10 To Linux.

Fedora 25 Making It Easy For First Time Users To Try.

Security Vulnerabilities in Linux Distributions.

Installing Fedora Workstation on a PC Notebook.

Tilix Terminal Emulator for Fedora Linux

Installing Multimedia and Restricted Codecs in Opensuse Linux.

Hotplugging a CPU and Disabling CPU Cores in Linux.

A Look at Some of the Popular Features in Plasma 5.1 for Linux.

Using Kmail Email Client on KDE in Linux.

How to Switch to GNU Linux.

How to Enable Wake Up On Lan in Linux.

Fixing Your Wireless Drivers in Opensuse.

Linux Mint 18 New Release.

Picking a Linux Operating System Using Slackware and Ubuntu.

LXD on Debian Using Snapd.

Saturday, 24 June 2017

Maru OS Mixes a Custom ROM with Dockable Debian Desktop.

Simplify Your Debian System with uCareSystem.

What To Expect From Linux Universal Packages.

Protecting Samba from SambaCry Exploit.

Microsoft Launch Debian Based Operating System.

Using Linux for Your Computing Needs.

Android Tamer Live Platform for Security Professionals.

Debian + Pixel with Raspberry Pi on Mac and Pc.

Simpler Updates on Debian and Ubuntu

Linux Universal Stack News