Tuesday, October 8, 2024

WP display error

 define('WP_DEBUG', true);

define('WP_DEBUG_LOG', true);

define('WP_DEBUG_DISPLAY', true);

@ini_set( 'display_errors', 1 );

define('SCRIPT_DEBUG', true);

define( 'SAVEQUERIES', true );

Saturday, November 13, 2021

WordPress revision disable

 Add the following code snippet in wp-config.php


define('AUTOSAVE_INTERVAL', 300); // seconds

define('WP_POST_REVISIONS', false);


Edit/add/append the following location block within the server block:

location / {
            try_files $uri $uri/ /index.php?$args; 
}

If your WordPress blog is in /faq/ sub-directory, try :

##
## note path to /faq/index.php 
##
location /faq/ {
            try_files $uri $uri/ /faq/index.php?$args; 
}

More examples

location /blog {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404,
#try_files $uri $uri/ = 404;
try_files $uri $uri/ /blog/index.php?$args;

} 

location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php7.4-fpm.sock;
}

client_max_body_size 20M;

==================================================

and on /etc/php/7.4/fpm/php.ini

upload_max_filesize = 20M
post_max_size = 25M



Thursday, July 19, 2018

Regular Expression to find Tag with with attributes or content

<[^<>]*>Gill Sans</[^<>]*>

<[^<>]*"Gill Sans"[^<>]*>[^<>]*</[^<>]*> 



  1. First expression: to find 'Gill Sans' within a tag
  2. 'Gill Sans' remaining as an attribute on the tag

Monday, July 9, 2018

Increase upload file size : Nginx, PHP on Ubuntu

In /etc/nginx/sites-available


server {
     client_max_body_size 128m;
} 



location ~ \.php$ {
         fastcgi_param PHP_VALUE "upload_max_filesize=128M \n post_max_size=128M";
}


When i used to publish WordPress site on VPS server. In the WordPress Back end Limit to 2MB uploading. After checking several methods, above option was success.  

Monday, November 3, 2014

Laravel Installtion behind proxy

Step 01 : 
Open CMD With administrative privileges.
set HTTP_PROXY=http://user:password@proxy.domain.com:port
 
Step 02 :
download the latest version of the Laravel framework and extract its contents into a directory on your server.(c:\wamp\www\laravel)

Downlod the latest composer.phar file from https://getcomposer.org/download/ and set environment PATH variable to composer.phar file

Step 03 : 
 goto laravel folder on CMD and run composer install
or composer create-project laravel/laravel Foldername --prefer-dist



Now it is ready to work

Monday, July 21, 2014

Joomla behind a proxy server

append bellow lines in configuration.php file

public $proxy_host = 'proxy server IP Address';
public $proxy_port = 'proxy server port';
public $proxy_enable = 'true';

I tested this with Joomla 3.3.1

  To configure Nginx for a Laravel application located within a subfolder, a  location  block is required to handle requests to that specifi...