Stylesheet conf/userstyle.css not found, please contact the developer of "dokuwiki_2024" template.
web:wordpress:wordpress_links
Различия
Показаны различия между двумя версиями страницы.
Предыдущая версия справа и слеваПредыдущая версияСледующая версия | Предыдущая версия | ||
web:wordpress:wordpress_links [2023/06/17 02:39] – dx | web:wordpress:wordpress_links [2024/05/02 19:18] (текущий) – dx | ||
---|---|---|---|
Строка 1: | Строка 1: | ||
+ | ====== CMS: WordPress ====== | ||
+ | {{: | ||
+ | |||
+ | Хомпэйдж, | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== GoD Bless ===== | ||
+ | |||
+ | Спасибо следующим статьям, | ||
+ | |||
+ | * [[https:// | ||
+ | * Почему wp_options вырастает до 100500+ ГБ, что такое autoload data и как быть - [[https:// | ||
+ | |||
+ | ===== Шаблоны ===== | ||
+ | |||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * https:// | ||
+ | * http:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | |||
+ | **Bootstrap based themes** | ||
+ | |||
+ | * https:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | |||
+ | ===== Хаки спамы куки ===== | ||
+ | |||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[https:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | ===== Плагины ===== | ||
+ | |||
+ | Разное | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * [[http:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * [[https:// | ||
+ | |||
+ | Карта сайта | ||
+ | * [[http:// | ||
+ | * http:// | ||
+ | ===== Yoast ===== | ||
+ | |||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | ===== Разное ===== | ||
+ | |||
+ | ==== Запрет выполнения кода ==== | ||
+ | |||
+ | < | ||
+ | Options -Indexes | ||
+ | php_flag engine 0 | ||
+ | RemoveHandler .phtml .php .php3 .php4 .php5 .php6 .phps .cgi .exe .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .htm .html .wml | ||
+ | AddType application/ | ||
+ | </ | ||
+ | |||
+ | ==== Как перенести сайт WP с одного домена на другой? | ||
+ | |||
+ | Через [[https:// | ||
+ | |||
+ | ==== Мини-статистика ram/ | ||
+ | |||
+ | <code php> | ||
+ | <?php | ||
+ | echo " | ||
+ | echo "s/ ". round(memory_get_usage()/ | ||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | ==== Мини-статистика ram/ | ||
+ | |||
+ | В стиле LiveInternet | ||
+ | |||
+ | < | ||
+ | <!-- WORDPRESS STATISTICS --> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | <!-- /WORDPRESS STATISTICS --> | ||
+ | </ | ||
+ | |||
+ | ==== Проверка работы почты ==== | ||
+ | |||
+ | Файл в корневой директории WP | ||
+ | |||
+ | <code php> | ||
+ | <?php | ||
+ | | ||
+ | // Set $to as the email you want to send the test to. | ||
+ | |||
+ | $to = " | ||
+ | |||
+ | // No need to make changes below this line. | ||
+ | // Email subject and body text. | ||
+ | |||
+ | $subject = ' wp_mail function test ' ; | ||
+ | $message = ' This is a test of the wp_mail function: wp_mail is working ' ; | ||
+ | $headers = '' | ||
+ | |||
+ | // Load WP components, no themes. | ||
+ | |||
+ | define (' | ||
+ | |||
+ | require(' | ||
+ | |||
+ | // send test message using wp_mail function. | ||
+ | |||
+ | $sent_message = wp_mail( $to, $subject, $message, $headers); | ||
+ | |||
+ | // | ||
+ | |||
+ | if ( $sent_message ) { | ||
+ | |||
+ | // The message was sent. | ||
+ | echo 'The test message was sent. Check your email inbox.' | ||
+ | |||
+ | } else { | ||
+ | |||
+ | // The message was not sent. | ||
+ | echo 'The message was not sent!' ; | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ==== htaccess по-умолчанию ==== | ||
+ | |||
+ | < | ||
+ | # BEGIN WordPress Permalinks | ||
+ | RewriteEngine On | ||
+ | RewriteBase / | ||
+ | RewriteRule ^index.php$ - [L] | ||
+ | RewriteCond %{REQUEST_FILENAME} !-f | ||
+ | RewriteCond %{REQUEST_FILENAME} !-d | ||
+ | RewriteRule . /index.php [L] | ||
+ | # END WordPress Permalinks | ||
+ | </ | ||
+ | |||
+ | ==== Лимит памяти для Wordpress ==== | ||
+ | |||
+ | Для wp-admin | ||
+ | |||
+ | < | ||
+ | |||
+ | Для frontend | ||
+ | |||
+ | < | ||
+ | |||
+ | ==== Еще один пример time used ==== | ||
+ | |||
+ | < | ||
+ | // Script start | ||
+ | $rustart = getrusage(); | ||
+ | |||
+ | // Code ... | ||
+ | |||
+ | // Script end | ||
+ | function rutime($ru, $rus, $index) { | ||
+ | return ($ru[" | ||
+ | | ||
+ | } | ||
+ | |||
+ | $ru = getrusage(); | ||
+ | echo "This process used " . rutime($ru, $rustart, " | ||
+ | " ms for its computations\n"; | ||
+ | echo "It spent " . rutime($ru, $rustart, " | ||
+ | " ms in system calls\n"; | ||
+ | </ | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ==== Отключить превью для ссылок twitter в постах ==== | ||
+ | |||
+ | https:// | ||
+ | |||
+ | Через [[https:// | ||
+ | |||
+ | ==== Пересоздание миниатюр ==== | ||
+ | |||
+ | Печальная новость. Автор плагина [[https:// | ||
+ | |||
+ | Вероятно [[https:// | ||
+ | |||
+ | Альтернативно для работы с миниатюрами [[https:// | ||
+ | |||
+ | ==== undefined function trailingslashit() ==== | ||
+ | |||
+ | <code php> | ||
+ | Fatal error: Uncaught Error: Call to undefined function trailingslashit() in / | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | установить php-psr | ||
+ | |||
+ | ==== Убрать ограничение 2560 px для загружаемых изображений ==== | ||
+ | |||
+ | Через [[https:// | ||
+ | |||
+ | code snippet [[https:// | ||
+ | |||
+ | <code php> | ||
+ | <?php | ||
+ | // Disable WordPress' | ||
+ | add_filter( ' | ||
+ | </ | ||
+ | |||
+ | functions.php | ||
+ | |||
+ | <code php> | ||
+ | add_filter( ' | ||
+ | </ | ||
+ | |||
+ | изменить размер | ||
+ | |||
+ | <code php> | ||
+ | function custom_image_threshold( $threshold ) { | ||
+ | | ||
+ | } | ||
+ | add_filter(' | ||
+ | </ | ||
+ | |||
+ | {{tag> |