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.

I am updating this post and had written a new one because things had changed I setup new relic, I rebuilt my server from scratch and

I have been banging my head against the wall on this one for quite some time. I have quite a few Custom Service Providers in my app, and Custom MU Plugins. I am going to try and leave as much details as possible, because my site can barely handle 2-3 users editing in the back of wordpress especially with Gutenberg and the pattern editor.

Stock Radicle seemed to be okay when I rebuilt my server from scratch but to be honest never really battle tested it with multiple users. The pattern editor itself was still a little bit slow with stock radicle. I actually took latest radicle and copied in all my code changes one by one and tested speed regressions on the site and it seemed ok until we had multiple users.

I deploy my site to cloudways 2gb server for qa

I simply deploy to a wordpress instance that was already installed change the root to current/public because I am using envoyer and run composer install &


cd {{ release }}

wp acorn optimize
wp acorn icons:cache
wp acorn route:cache
wp rewrite flush

When I started I dumped the db and reinstalled wordpress

But to be honest this site is very slow

I need help and have tried to post here before but didn’t quite find what I needed.

I have new relic setup and it’s reporting a lot of data but I’m not exactly sure where to look in it.

If someone could point me in the right direction even if there is some help I could pay for from Radicle team I am really stuck at the moment

I have these following App Service Providers


'providers' => ServiceProvider::defaultProviders()->merge([
        /*
         * Package Service Providers...
         */

        /*
         * Application Service Providers...
         */
        App\Providers\ThemeServiceProvider::class,
        App\Providers\PostTypesServiceProvider::class,
        App\Providers\SpeciesBlockServiceProvider::class,
        App\Providers\CustomizerServiceProvider::class,
        App\Providers\AssetsServiceProvider::class,
        App\Providers\BlocksServiceProvider::class,
        App\Providers\ThemeColorsServiceProvider::class,
        App\Providers\TemplateCustomizerServiceProvider::class,
    ])->toArray(),

Heres a gist of the providers and plugins

Any help would be great I am just really stuck

Can you try setting up a staging site using Trellis to see if that solves the issue? Get a decently priced server at Hetzner or something to rule out server performance while we’re at it.

What about my .env file where do I put those variables?

Ok I think I use vault for .env files thats fine

I am getting very close I think but now I get

FAILED! => {"changed": true, "cmd": ["wp", "acorn", "optimize"], "delta": "0:00:00.221315", "end": "2025-01-29 20:06:29.265709", "msg": "non-zero return code", "rc": 1, "start": "2025-01-29 20:06:29.044394", "stderr": "Error: The site you have requested is not installed.\nRun `wp core install` to create database tables.", "stderr_lines": ["Error: The site you have requested is not installed.", "Run `wp core install` to create database tables."], "stdout": "", "stdout_lines": []}

For acorn optimize, any ideas?

I can run wp on the server under the web user.

But I get this

web@ubuntu-16gb-hil-1:/root$ wp core is-installed
Error: This does not seem to be a WordPress installation.
The used path is: /root/
Pass --path=`path/to/wordpress` or run `wp core download`.
web@ubuntu-16gb-hil-1:/root$ 

And I succesfully provisioned

heres some more info

Error: This does not seem to be a WordPress installation.
The used path is: /srv/www/scbc-trellis.com/
Pass --path=`path/to/wordpress` or run `wp core download`.
web@ubuntu-16gb-hil-1:/srv/www/scbc-trellis.com$ 
1 Like

The site seems to remarkably faster, now it does have way more memory than cloudways and is about the same cost, I guess you don’t get the hand holding of cloudways but to be honest seems like its been more of a pain then help. The pattern editor is still slow but better. I don’t know if I can reccomend cloudways for this stack after all the rebuilds I have done and migration. But I will make the other answer as solution for now.