• Resolved djbo5a5

    (@djbo5a5)


    Hello, I am serving my images from the subdomain “static.mydomain.com” and there is no “uploads” directory inside, all images are in the root of the subdomain. I am getting “Server configuration error”. How can I set the correct path?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hello @djbo5a5,

    Thanks for your message.

    What exactly error are you getting? Can you tell me more about your directory structure?

    Best,
    Mateusz

    Thread Starter djbo5a5

    (@djbo5a5)

    Instead of “maidomain.com/wp-content/uploads/”, I am using “maidomain.com/static/” which is a subdomain. I have changed the directories path here “/wp-admin/options.php”.

    Currently, I am getting this error:

    Server configuration error
    The path for /uploads files does not exist (function is_dir() returns false). Use filter webpc_dir_path to set the correct path. The current using path is: /home/xxx/domains/maidomain.com/static/. Please read the plugin FAQ to learn more.

    Error codes: path_uploads_unavailable

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @djbo5a5 In this case, you have to adjust the paths using the appropriate filters. This is described in the plugin FAQ.

    Thread Starter djbo5a5

    (@djbo5a5)

    I did already, but still, the error persists. Could you check my code below, maybe I missed something?

    add_filter( 'webpc_dir_name', function( $path, $directory ) {
        if ( $directory !== 'uploads' ) {
            return $path;
        }
        return 'static/';
    }, 10, 2 );
    add_filter( 'webpc_dir_name', function( $path, $directory ) {
        if ( $directory !== 'webp' ) {
            return $path;
        }
        return 'static/uploads-webpc';
    }, 10, 2 );
    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @djbo5a5 What is your FTP directory structure? Please write it down carefully.

    It is marked as solved but what, exactly, was the solution?
    I can implement code, but am not very good at authoring code

    I have the same problem:

    ROOT
    – hundvardag.nu
    |- public_html
    ||- WP directory with all the config.php and wp-stuff
    – media.hundvardag.nu
    |- public_html
    ||- All media files -some in folders by year and month etc

    • This reply was modified 2 years, 10 months ago by thesuss. Reason: Missed a folder
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can’t set the correct path’ is closed to new replies.