close

May 2024 only! Join our Discord free of charge.

Slick­Stack
Lightning-fast WordPress on Nginx

how to edit wp-config.php on SlickStack server

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #4887
    Joan
    Guest

    I want to add some PHP code but there is no permission to edit the file, and seems the code is overwritten during upgrades?

    #4891
    Edward
    Guest

    SlickStack limits file permissions on wp-config.php to make it read-only for better security so that WP plugins can’t hack it

    and during reinstall SlickStack will regenerate the file entirely too

    #4906
    Doris
    Guest

    what options are you trying to edit in wp-config, and why? mostly you should be editing only your ss-config file instead.

    #4907
    Patricia
    Guest

    UPDATE:

    https://github.com/littlebizzy/slickstack/issues/168

    Based on user demand SlickStack is (once again) now supporting a custom functions file where you can add PHP constants or other items that you might usually add to your wp-config.php file… this new functions file path is here:

    /wp-content/custom-functions.php

    The file is not created by default, however, if SlickStack’s wp-config.php detects that file exists it will be loaded.

    Note that a few years ago we had a similar feature (it was an entire MU plugin actually) and a script was force-generated, but it’s now much lighter and simpler.

    #4908
    Joe
    Guest

    but we still can’t edit the wp-config.php correct

    #4909
    Carolyn
    Guest

    but we still can’t edit the wp-config.php correct

    Technically you can sudo nano that file via shell and edit if you want, but your changes are going to be overwritten during next update anyways

    Just use the settings in ss-config is better.

    Or if you want custom PHP constants, make a custom-functions.php script.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Thanks to our generous sponsors for their support!