I updated my Ubuntu 24.04 and my WordPress stopped loading images of size 1.3MB and higher.
I fixed this by adding the following:
client_max_body_size 32M;
to Nginx configuration.
(more…)I updated my Ubuntu 24.04 and my WordPress stopped loading images of size 1.3MB and higher.
I fixed this by adding the following:
client_max_body_size 32M;
to Nginx configuration.
(more…)Add the following class to your style.css:
.scrollable-log {
overflow-y: scroll;
font-family: Monaco, "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
font-weight: normal !important;
font-style: normal !important;
font-size: 1em !important;
max-height: 400px;
}
To prevent a website from changing its source code set user = nobody in its pool config, that can be /etc/php/8.3/fpm/pool.d/slogpost.conf for example:
[slogpost]
user = nobody
group = slogpost
listen = /run/php/www-slogpost.sock
include=/etc/php/8.3/fpm/socket-owner.conf
pm = ondemand
pm.max_children = 10
pm.start_servers = 0
pm.min_spare_servers = 0
pm.max_spare_servers = 1
pm.max_requests = 500
slowlog = /var/log/php-my/$pool.slow.log
request_slowlog_timeout = 5s
request_terminate_timeout = 300s
chdir = /
When the user enters a page or post password WordPress sets wp_postpass_XXXX cookie:

Use chrome://settings/cookies/detail?site=developernote.com to see the cookies in Google Chrome browser.
My SyntaxHighlighter plugin started to display “>” as “ = & g t ;” after I updated my WordPress to a version where blocks were added. To fix the plugin I added the following line to wp-content/plugins/syntaxhighlighter/syntaxhighlighter.php:
$code = preg_replace( '#<pre [^>]+>([^<]+)?</pre>#', '$1', $content );
// Undo escaping done by WordPress
$code = htmlspecialchars_decode( $code );
return $this->shortcode_callback( $attributes, $code, 'code' );
There are a lot of plugins for adding footers to WordPress posts and one of them is so called “Add Post URL” plugin written by some Chinese guys. From my perspective, its benefits includes macros support and ability to decide whether or not to display the footer for each post individually. It worked fine for me and I even improved it a little bit. The following code snippet shows how I added “post_id” macro:
$footer_text = $posturl_options['footer_text'];
$footer_text = trim($footer_text);
if (!empty($footer_text))
{
//remove_filter( 'the_content', 'wpautop' );
$post_id = get_the_ID();
$footer_text = str_replace("%post_id%", $post_id, $footer_text);
$footer_text = str_replace("%site_url%", site_url('/'), $footer_text);
$footer_text = str_replace("%site_name%", get_bloginfo('sitename'), $footer_text);
$footer_text = str_replace("%post_url%", get_permalink(), $footer_text);
$footer_text = str_replace("%post_title%", the_title('', '', false), $footer_text);
$footer_text = stripslashes($footer_text);
$text .= $footer_text;
}
Windows Live Writer is configured for working with WordPress multi-site the same way as with normal single-site WordPress installation, but WordPress works a bit differently in multi-site and single-site configurations. The difference consists in a few lines of code in wp-includes/class-wp-xmlrpc-server.php:
function wp_getUsersBlogs( $args ) {
global $current_site;
// If this isn't on WPMU then just use blogger_getUsersBlogs
if ( !is_multisite() ) {
array_unshift( $args, 1 );
return $this->blogger_getUsersBlogs( $args );
}
//single-site verion...
}