Membership 2 Pro creating corrupt htaccess file

I am developing a multisite that is not live yet. Most of the sites are running The Core theme (some child version of) from Themefuse. I have just upgraded to WP v 4.8.2, Core v 1.0.25 and Unyson v 2.7.7. My sites lost the css associated with the theme and I asked them for support. The result was a corrupt .htaccess file in wp-content/uploads. (I'd gone through the process of turning off all plugins and then deleting the htaccess file). All seemed to be good when I reset everything, but next time I logged in it was gone again. I have now narrowed this down to Memberhip 2 Pro putting that file there (it reappears shortly after me deleting it). I have just updated Membership 2 Pro (v1.1.1) hoping that would solve the problem, but it hasn't. With Membership 2 Pro not active, my site is fine. I will need Memberhip 2 Pro working for some of my sites before they can go live.

  • Paul Kevin

    Hello Lisa,

    Hope you are well today. The .htaccess file will only appear if Media protection is enabled with "Advanced media protection" option enabled. Membership will create a .htaccess file with the following content:

    ## Membership 2 - Media Protection ##
    Options -Indexes
    Deny from all
    <FilesMatch '\.(jpg|jpeg|png|gif|mp3|ogg|pdf)$'>
    Order Allow,Deny
    Allow from all
    </FilesMatch>
    ## Membership 2 - End ##

    Which is a htaccess rule to prevent direct access to any other file types except those listed in the advanced media protection tab under the Membership Settings page. In most cases theme css and js files are not in the uploads directory, but to turn this off, you can disable "advanced media protection".

    Warm Regards
    Paul Kevin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.