Error when activating a custom plugin on production server


I’m currently developing a custom plugin. All works well on my local dev environment (Local by Flywheel), but, on production environment, I’m unable to activate the plugin. I get this error message:

Fatal error: Class 'Activate' not found in /datas/vol3/w4a156338/var/www/my-website/htdocs/wp-content/plugins/ads-toolbox/ads-toolbox.php on line 54

The ‘ads-toolbox.php’ file it the plugin main php file and it contains the following:

function activate_adstoolbox_plugin() {
register_activation_hook( __FILE__, 'activate_adstoolbox_plugin' );

Line 54 is: IncBaseActivate::activate();

The class ‘Activate’ is inside the ‘Activate.php’ file located in ‘inc/Base/’ subdirectory and contains:

namespace IncBase;

class Activate
    public static function activate()
        //Some code


I do not understand why it works locally but not on my hosted site!?

Any idea ?

, Lebrac'h 2 years 2020-01-01T08:38:21-05:00 0 Answers 80 views 0

Leave an answer