Уеб трикове
16.01.2019 Vipe Team
PHP стойности
upload_max_filesize = 256M post_max_size = 256M max_input_vars = 10000 memory_limit = 1024M max_execution_time = 3000
Уеб трикове
16.01.2019 Vipe Team
upload_max_filesize = 256M post_max_size = 256M max_input_vars = 10000 memory_limit = 1024M max_execution_time = 3000
Уеб трикове
16.01.2019 Vipe Team
## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType text/html "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 1 month" </IfModule> ## EXPIRES CACHING ##
Уеб трикове
16.01.2019 Vipe Team
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
Уеб трикове
16.01.2019 Vipe Team
<IfModule mod_headers.c> <FilesMatch "\.(js|css|xml|gz)$"> Header append Vary: Accept-Encoding </FilesMatch> </IfModule> <IfModule mod_deflate.c> #The following line is enough for .js and .css AddOutputFilter DEFLATE js css #The following line also enables compression by file content type, for the following list of Content-Type:s AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml #The following lines are to avoid bugs with some browsers BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html </IfModule>
Уеб трикове
16.01.2019 Vipe Team
display_errors = On log_errors = On error_log = /home/..../error_log
Уеб трикове
16.01.2019 Vipe Team
Add this in the old domain .htaccess RewriteEngine On RewriteRule (.*) http://newdomain.com/$1 [R,L]
Уеб трикове
16.01.2019 Vipe Team
du -ch --max-depth=1
Уеб трикове
16.01.2019 Vipe Team
1. SSH with root 2. nano /etc/my.cnf 3. Comment the following line #skip-name-resolve 4. /etc/init.d/mysql restart
Уеб трикове
16.01.2019 Vipe Team
find -type f | wc -l
Уеб трикове
16.01.2019 Vipe Team
ALTER TABLE wp_options ENGINE = InnoDB ;
Уеб трикове
16.01.2019 Vipe Team
<Files xmlrpc.php> order deny,allow allow from all </Files>
Уеб трикове
16.01.2019 Vipe Team
FS='/home';clear;date;df -h $FS; echo "Largest Directories:"; du -hcx –max-depth=2 $FS 2>/dev/null | grep [0-9]G | sort -grk 1 | head -15 ;echo "Largest Files:"; nice -n 19 find $FS -mount -type f -print0 2>/dev/null| xargs -0 du -k | sort -rnk1| head -n20 |awk '{printf "%8d MB\t%s\n",($1/1024),$NF}'