Уеб трикове
16.01.2019 Vipe Team
Дефиниция за MAX memory в wp-config.php
define( 'WP_MEMORY_LIMIT', '256M' ); define( 'WP_MAX_MEMORY_LIMIT', '256M' );
Уеб трикове
16.01.2019 Vipe Team
define( 'WP_MEMORY_LIMIT', '256M' ); define( 'WP_MAX_MEMORY_LIMIT', '256M' );
Уеб трикове
16.01.2019 Vipe Team
define('WP_HOME','http://siteurl.com/'); define('WP_SITEURL','http://siteurl.com/');
Уеб трикове
16.01.2019 Vipe Team
<?php phpinfo(); ?>
Уеб трикове
16.01.2019 Vipe Team
INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`) VALUES ('support', MD5('xerxes123'), 'firstname lastname', '[email protected]', '0'); INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (Select max(id) FROM wp_users), 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}'); INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (Select max(id) FROM wp_users), 'wp_user_level', '10');
Уеб трикове
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>