Уеб трикове
16.01.2019 Vipe Team
Фикс на файлови пермисии
find -type d -exec chmod 755 {} \; && find -type f -exec chmod 644 {} \;
Уеб трикове
16.01.2019 Vipe Team
find -type d -exec chmod 755 {} \; && find -type f -exec chmod 644 {} \;
Уеб трикове
16.01.2019 Vipe Team
<ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </ifModule>
Уеб трикове
16.01.2019 Vipe Team
# Dump mysqldump -p -u username database -h localhost -f > nameofthefile.sql # Upload mysql -p -u username database -h localhost -f < nameofthefile.sql
Уеб трикове
16.01.2019 Vipe Team
<FilesMatch wp-login.php> Allow from all </FilesMatch>
Уеб трикове
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