I suggest you ...

Staging - add ability to ignore certain files

Thanks for adding the new staging feature, this is great!

During my testing I discovered that my staging .htaccess file was pushed to live and the result was a 500 error on live. I need to use a slightly different .htaccess file on staging, because I force the www version on live. I couldn't access staging with this rule. So the differences in .htaccess rules caused the error.

It would great if you could add a way to ignore certain files, similar to gitignore.

5 votes
Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)

We’ll send you updates on this idea

Steve shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

4 comments

Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
Submitting...
  • Anonymous commented  ·   ·  Flag as inappropriate

    Its a critically required feature. I have separate config files for live and staging.
    After pushing from staging to live, my live application starts working the way which isn't expected.

  • scott commented  ·   ·  Flag as inappropriate

    Why not just add a file tree that we can choose exactly what we want to push and pull back and forth?

  • Fabio Fava commented  ·   ·  Flag as inappropriate

    So, some files should be left "as-is" for the already commented reasons:

    - wp-config.php (salt keys & other tweaks we may do) and .htaccess (same reason).
    - All folders having "cache" on the name should not be pushed/pulled (serialization).

    The Staging as is on November 6 2018 isn't yet perfect. My main site is in Brazilian Portuguese, and when I select this language on the WordPress Settings, some custom translations get crazy as you can see on my ticket below:

    https://tickets.cloudways.com/hc/en-us/requests/115791

    Anyway I think we are very close of having a nerly-perfect Staging System.

  • Carl Nasal commented  ·   ·  Flag as inappropriate

    Similiar to Steve's comment, I found that wp-config.php gets copied when you push or pull. I'm using Redis with the "WP_CACHE_KEY_SALT" defined in wp-config.php, and that key is being overwritten when pushing or pulling, which causes the site to use the wrong Redis cache key, which introduces all kinds of problems.

    It would be nice if we could control what files to exclude, but even if not, there may be a few common files that should always be excluded like .htaccess and wp-config.php since those are designed to be specific for a given instance.

Feedback and Knowledge Base