Slow Speed on backend and front end of Radicle Site, Diagnosing...

I am trying to determine why my WP site running a Radicle theme on cloudways is running so slowly. Initially I was on 1gb of memory and it didn’t seem to bad this was just QA so I thought we could get away with that but eventually things seemed to slow down with maybe 2-3 users on it. I upped the memory to 2gb, and still not much of an improvement.

I installed Laps GitHub - Rarst/laps: Light WordPress profiler.

And here is a particularly long loading time





I really just need a point in the right direction to where I should start optimizing or figuring out what is causing such slow loading times.

I am happy to provide much more information, but since so many files are responding slow here I don’t know where to start. Sometimes the response is 1-3 seconds or on average it is that but I’d still like to get that down.

In production I can up memory but I think there is something wrong that it is so slow on 2gb with barely anyone using it since it has htaccess password across the whole site, so there shouldn’t be any other traffic.

What theme version are you using? You did provision the VPS on Cloudways with Trellis? What type of VPS - Ubuntu 24.0.4? Seems that Cloudways do their own VPS setups as they are managed so not sure if that is an issue but could be. Also see Trellis on Cloudways without Root access

So I am not using Trellis I had used the default wordpress install on cloudways. It runs Debian 11 bullseye PHP 8.1.30.

I just installed the basic wordpress cloudways install deleted its folders to keep its config and deployed my site via envoyer using this setup.

Maybe a dumb question but how do I know what version of the theme I am on, if it’s not a package itself I just downloaded the zip, I don’t know where the original zip is, so where is the version tracked. Sorry if it’s super obvious I am tired just finished moving houses :wink:

Sage theme style.css should show version installed . But I assume that is one of the latest versions then. And if theme was composer installed the composer lock file will show it too of course. You should also have access to the Radicle repository https://github.com/roots/radicle/ .

When you use Bedrock, Sage you need to run composer install in two locations, in Bedrock and theme. You would also need to run yarn and yarn build in the theme directory. See documentation https://roots.io/sage/docs/installation/ , https://roots.io/sage/docs/compiling-assets/ and so on.

I understand you used Laravel’s Envoyer for Cloudways https://www.cloudways.com/blog/php-laravel-envoyer-deployment/ . Not familiar with that tool. Only used Forge.

Checking logs for PHP FPM, Nginx or Apache would be useful too.

The only logs I could find on the server were laravel logs in storage/logs

This is what chatGPT said about the logs

Analysis of the Logs

And my themes style.css only has this in it

/**
 * Theme Name: Radicle
 */

The logs reveal two primary issues happening in your Laravel-based application with Acorn and Blade UI Kit components. Below is a breakdown of the errors and what they mean.

1. Logger Configuration Error

Error:

laravel.EMERGENCY: Unable to create configured logger. Using emergency logger.

{“exception”:“[object] (InvalidArgumentException(code: 0): Log is not defined.”}

Cause:

• Laravel is attempting to use a log channel that is either undefined or improperly configured in config/logging.php or .env.

• The LOG_CHANNEL environment variable may be set to an invalid value or empty.

Impact:

• The application falls back to the “emergency logger,” which only writes critical errors to a default location.

Solution:

  1. Check the .env file for the LOG_CHANNEL setting:

LOG_CHANNEL=stack

  1. Ensure the specified log channel is defined in config/logging.php under the channels key.

  2. If you want a simple fallback, you can use single or daily as the default:

‘default’ => env(‘LOG_CHANNEL’, ‘single’),

  1. Clear cached configuration:

php artisan config:clear

php artisan config:cache

2. Skipping Provider: Blade UI Icons Configuration

Error:

Skipping provider [Roots\Acorn\Assets\AssetsServiceProvider] because it encountered an error

[BladeUI\Icons\Exceptions\CannotRegisterIconSet].

Details:

BladeUI\Icons\Exceptions\CannotRegisterIconSet: The options for the “heroicons” set don’t have a prefix defined.

Cause:

• The Blade Heroicons package is trying to register an icon set (heroicons) but doesn’t have a required prefix defined in the configuration.

• This typically happens if the config/blade-icons.php file is missing or incorrectly configured.

Impact:

• The heroicons icon set cannot be used, and the affected service provider is skipped, leading to incomplete functionality or errors in the application.

Solution:

  1. Verify the blade-icons.php configuration file exists. If not, publish it:

php artisan vendor:publish --tag=blade-icons-config

  1. In config/blade-icons.php, ensure the heroicons set has a prefix defined:

‘sets’ => [

‘heroicons’ => [

‘path’ => resource_path(‘icons/heroicons’),

‘prefix’ => ‘hero’, // Add a valid prefix

],

],

  1. Clear the Blade cache to apply the changes:

php artisan view:clear

Steps to Verify and Resolve Both Issues

  1. Check .env Variables:

• Ensure that LOG_CHANNEL and other relevant environment variables are set correctly.

• Example:

LOG_CHANNEL=stack

  1. Publish and Configure Blade Icons:

• Run:

php artisan vendor:publish --tag=blade-icons-config

• Update the config/blade-icons.php file as necessary.

  1. Clear Cache:

• Run these commands to ensure no stale configurations remain:

php artisan config:clear

php artisan cache:clear

php artisan view:clear

php artisan route:clear

  1. Restart Services:

• After making the changes, restart your PHP process or server to apply updates:

sudo service php-fpm restart

If you continue encountering issues, it might help to check:

• Dependency mismatches between Laravel, Acorn, and Blade UI Kit.

• Any recent updates or deployment configurations that could have introduced inconsistencies.

Let me know if you need additional assistance debugging this!

Roots stack uses Acorn for Laravel matters. That is like the php artisan task-name command See Acorn | Integrate Laravel With WordPress | Roots . To list commands you can use wp acorn list .

You can use

  • wp acorn cache:clear to clear the application cache or
  • wp acorn config:clear to remove the configuration cache file if need be or even
  • wp acorn optimize:clear to remove the cached bootstrap files.

On a production server all should be optimized normally of course. And with Trellis deployment you can do all that on the fly.

Why you are having issues with logging I do not know. I recommend checking https://roots.io/acorn/docs/logging/

For zero-config setups, logs live at [wp-content]/cache/acorn/logs/.

But if there were issues generating one due to your permissions setup it might not have been. Or Radicle tries to put them elsewhere.

On a Trellis Bedrock setup locally the path is

WP_DEBUG_LOG='/srv/www/domain.com/logs/debug.log' 

and path set in site/.env . Assume your Bedrock .env has details too.

As for the icons, not sure if you really published the icons configuration nor if you made package available. See https://roots.io/sage/docs/use-blade-icons/ If you do want to use config you would have to have run wp acorn vendor:publish --tag=blade-icons Same as with Laravel Artisan really.

Ok I understand what you are saying. But what I am really trying to determine at the moment is why I don’t have any other logs.

What do I need to do to determine why they are not generating?
Screenshot 2024-12-17 at 11.50.07 AM

Especially the issue I am dealing with is that gutenberg is very very very slow, and I can’t figure out why.