• Resolved Madhur

    (@madkul24)


    I wanted to get a profile of my wordpress site ( which is running on localhost with a proxy host name ). My wordpress app is installed over WSL2 running on Windows env. I added the code-profiler plugin to my plugins folder, and activated the same through WordPress Admin. However, when I try running the profile, it says –


    Cannot create the report: the profiler didn’t generate a data file. Make sure the following directory is writable: /var/www/html/wp-content/uploads/code-profiler/. If you are using a caching plugin or an opcode cache, try to disable it.

    I am not using any caching plugin. Also the location of my plugin is –
    /home/maddy/projects/myapp/wordpress/wp-content/plugins/code-profiler , but the error is pointing to /var/www/html/. There is no www folder for me inside /var inside the Linux subsystem.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author bruandet

    (@bruandet)

    Code Profiler uses the wp_upload_dir() function to retrieve the upload folder.
    Could you make sure that your configuration returns the right values for the plugin and content directories: https://codex.www.ads-software.com/Determining_Plugin_and_Content_Directories

    Thread Starter Madhur

    (@madkul24)

    Hi @bruandet ,

    wp_upload_dir() is by default returning – ‘/var/www/html/wp-content/uploads’, though I have not configured var/www/html in wp-config.php. Is this something which wordpress automatically sets the path as ? I am a newbie in wordpress so may be missing out something.

    Plugin Author bruandet

    (@bruandet)

    WordPress sets it.
    But you can try to define it in your wp-config.php:
    define('UPLOADS', 'wp-content/uploads');

    But it will be relative to the ABSPATH constant, which is defined in your wp-config.php. It looks like this:

    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
       define('ABSPATH', dirname(__FILE__) . '/');
    

    Is your ABSPATH correct?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cannot create the report: the profiler didn’t generate a data file’ is closed to new replies.