Category Archives: CMS

How to add a scrollable text block to a WordPress post

With preformatted block

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;
}
(more…)

Updating website icon in Joomla 5

For the Cassiopeia template, Joomla will look for the favicons in the following locations:

  1. media/templates/site/cassiopeia/images – they are not there so Joomla will look in the next location.
  2. media/system/images – they are there so Joomla will use them from there.
wget -O - https://sharlines.com | grep -i favicon
        <link href="/media/system/images/joomla-favicon.svg" rel="icon" type="image/svg+xml">
        <link href="/media/templates/site/cassiopeia/images/favicon.ico" rel="alternate icon" type="image/vnd.microsoft.icon">
        <link href="/media/system/images/joomla-favicon-pinned.svg" rel="mask-icon" color="#000">
(more…)

Denying access to /xmlrpc.php on a WordPress website

Today I notices that my WordPress website consumes 30% CPU.

(more…)

Upgrading my Joomla website from 4 to 5

Pre-Update check page displayed that I need Output Buffering:

(more…)

Upgrading my Joomla website from 3 to 4

I have the following Joomla version:

(more…)

How to update a WordPress website securely

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 = /
(more…)

How I tried to fix “Suggested maximum image size is 2560 pixels” error in WordPress

While uploading an image I got:

(more…)

Installed Post Password Token WordPress plugin

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.

(more…)

How to publish a WordPress post

Login to WordPress admin panel, select Posts on the left sidebar and create new post:

(more…)

Making SyntaxHighlighter plugin display “>” symbol correctly.

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' );
(more…)