Support » Plugin: Autoptimize » Changed wp-content foldername, now it does not work

  • 1BJK903

    (@1bjk903)


    Hi Frank,

    I have a website in which I had changed the wp-content foldername to something else. I activated Autoptimize, butttt now it does not work because it says that it can’t write to the directory /wp-content/cache/autoptimize, which isn’t crazy cause it does not exist.

    I tried adding the folders myself, but it does not recognize it.

    Is there a chance I can fix this, without having to change the foldername back?

    https://wordpress.org/plugins/autoptimize/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Frank Goossens

    (@futtta)

    Morning 1BJK903;
    What do you have in wp-config.php to tell WP about that move content dir?

    frank

    1BJK903

    (@1bjk903)

    Goedemorgen, Frank.

    I made it like this:

    define ( ‘WP_CONTENT_FOLDERNAME’, ‘newfoldernamehere’ );
    define ( ‘WP_CONTENT_DIR’, ABSPATH . WP_CONTENT_FOLDERNAME );
    define ( ‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/’ );
    define ( ‘WP_CONTENT_URL’, WP_SITEURL . WP_CONTENT_FOLDERNAME );
    require_once(ABSPATH . ‘wp-settings.php’);

    Plugin Author Frank Goossens

    (@futtta)

    morgend 🙂

    What does echo WP_CONTENT_DIR; report?

    frank

    1BJK903

    (@1bjk903)

    Sorry for my late response, was quite busy.

    It probably echos the name of my own content directory, but don’t know how to log it. Can you help me with that?

    Plugin Author Frank Goossens

    (@futtta)

    hmm …

    add this:

    error_log("wp content dir = ".WP_CONTENT_DIR);

    to your (child) theme’s functions.php and look in your PHP error log (and remove the line from functions.php once you have the resulting log-entry)?

    frank

    Hey Frank,

    Once again: sorry for my late response.

    I can’t find my PHP error log… it should be in the content dir, in the file debug.log, but I can’t see such file.

    How do I fix this?

    Plugin Author Frank Goossens

    (@futtta)

    I can’t find my PHP error log… it should be in the content dir, in the file debug.log, but I can’t see such file.

    better check with your hoster (or your local sysadmin), could be anywhere (defined in php.ini).

    frank

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Changed wp-content foldername, now it does not work’ is closed to new replies.