How to pass $_POST variables via PHP CURL

If you wish to pass PHP POST array variables without submitting a form, using the PHP Curl library to another URL, you first need to have a an Array which holds all the values for the POST array $post[‘lname’] = ‘Last name’; $post[‘fname’] = ‘First Name’ $post[‘mail’] = ‘[email protected]’; Once we have the array set, […]

Redirect all HTTP requests to HTTPS for Nginx

To add redirect for all HTTP requests to HTTPS, we need to add Nginx Redirect rules to the nginx config file. The server block for http requests should look like : ## our http server at port 80 server { listen default; server_name; ## redirect http to https ## rewrite ^ https://$server_name$request_uri? […]

How to increase PHP file upload limit with PHP FPM and Nginx

If while uploading a file you get an error with the following text in it : “client intended to send too large body:” You can fix this error by increasing the PHP File-Upload Limit as following : Step 1: Open php.ini file nano /etc/php5/fpm/php.ini And update ‘upload_max_filesize’ and ‘post_max_size’ values upload_max_filesize = 150M post_max_size = […]

How to delete duplicate posts from WordPress

One of the biggest problems users get stumped by is the problem of duplicate posts. Some users who have 30K+ posts on there blog and they wish to delete the duplicate posts, it can be really taxing for them to go through the list of posts from wp-admin and delete each post one by one. […]

How to install WP-Cli on your Linux server

WP-CLI is a command line tool to manage your WordPress installation. To install it on your Linux server you require SSH access for the server. Note: To install WP-CLI you require PHP version 5.3.2 and later and WordPress version 3.5.2 and above Step 1 : Download the ‘wp-phar.phar’ File in your ‘opt’ folder. cd /opt […]

How to create a cron job on a linux server

Cron is a command to the Server, for a job that is to be executed at a specified time. Cron is one of the most useful tool in a server. It can be run for jobs like creating backups, cleaning files, monitoring tasks etc. The ‘crontab’ command is used to edit/create cron jobs for the […]

WordPress Multisite with Nginx

If you are setting up a WordPress multisite, you might notice that the WordPress install displays the Apache settings for the .htaccess file, but does not provide any settings for Nginx. How to setup WordPress Multisite Open the wp-config.php file and add the following line /* Multisite */ define(‘WP_ALLOW_MULTISITE’, true); Select the type of Multisite […]