nginx | Page Redirect from OLD URL to NEW URL.

Redirect Page from OLD URL to NEW URL Nginx : Syntax  : rewrite ^/<OLD LOCATION>$ <NEW LOCATION> permanent; Example  : rewrite ^/oldlocation$ permanent;

PHP | mail | Send email thru PHP mail function.

Send mail thru PHP Mail function Mail Function send an email from the direct PHP Script. Syntax : mail(to,subject,message,headers,parameters); Example : $to = “”; $subject = “HTML email”; $message = “<html><head><title>HTML email</title></head> <body> <p>This email contains HTML Tags!</p> <table> <tr><th>Firstname</th><th>Lastname</th></tr> <tr><td>John</td><td>Doe</td></tr> </table></body></html>”; $headers = “MIME-Version: 1.0” . “\r\n”; $headers .= “Content-type:text/html;charset=UTF-8” . “\r\n”; $headers .= […]

MySQL | Find and Replace text in Column value

Find and Replace text in Column value The below example shows the find and replace text in column values in MySQL tables. Syntax : UPDATE `<Table Name>` SET `<Field Name>` = replace(fieldName,  FIND_TEXT,  REPLACE_TEXT) Example : UPDATE `Employee` SET `allImageURLsMobile` = replace(allImageURLsMobile, ‘/ids/’, ‘/ids/mobile/’)

WordPress asking FTP Credentials to Install Plugins ?

Install WordPress PLUGIN without FTP Credentials in Dashboard ? Open WORDPRESS Folder EDIT wp-config.php Paste the below code snippet (define(‘FS_METHOD’, ‘direct’);) Save the FILE and refresh the dashboard.

How to add SSH key in Ubuntu ?

Add SSH Key in Server Open Terminal Command pbcopy < ~/.ssh/ Open server terminal cd ~/.ssh pico authorized_keys paste the copied key.

PHP – PDF Generator

FPDF – PDF Generation FPDF is a PHP class which allows to generate PDF files with pure PHP, that is to say without using the PDFlib library. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs. fPDF Tutorial – Sample Code […]

Copy SSH key to Clipboard

How to Copy SSH Key to ClipBoard ? Mac Open Terminal Command pbcopy < ~/.ssh/

How to compress files and folders in Ubuntu ?

Compress Files and Folders in Ubuntu Zip File / Folder apt-get install zip zip -r <<FILENAME>>.zip <<FOLDERNAME>> Rar / Unrar To extract the contents of a .rar file, run this command unrar e file.rar Compress Files, Folders & Subfolders rar a -r <<FILENAME>> <<FOLDER NAME>> UnCompress Files, Folders & Subfolders unrar x <<FILENAME>>.rar <<FOLDER>>

Default nginx path in ubuntu ?

Nginx Path in Ubuntu /etc/nginx/nginx.conf Edit nginx.conf in Ubuntu pico /etc/nginx/nginx.conf cat /etc/nginx/nginx.conf vi /etc/nginx/nginx.conf Restart nginx Service service nginx restart

How to add and view tasks in Cron Job ?

Add / View – Cron Jobs Servers can automatically perform tasks that you would otherwise have to perform yourself, such as running scripts. On Linux servers, the cron utility is the preferred way to automate the running of scripts. In this article we’ll cover how to view the jobs scheduled in the crontab list View Cron Job Lists […]