Title: Disabling PHP execution in /uploads/
Last modified: November 13, 2020

---

# Disabling PHP execution in /uploads/

 *  Resolved [davemccourt](https://wordpress.org/support/users/davemccourt/)
 * (@davemccourt)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/disabling-php-execution-in-uploads/)
 * Hi, I normally disable PHP execution in /uploads/ as a security measure (I’ve
   seen PHP code in uploaded files before). I usually use an .htaccess file to do
   this.
 * I notice that Koko creates a file called pageviews.php
 * Will Koko still work if PHP execution is disabled here?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Lap](https://wordpress.org/support/users/lapzor/)
 * (@lapzor)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/disabling-php-execution-in-uploads/#post-13659114)
 * Koko will indeed not work if PHP execution is turned off for that file.
 *  Plugin Author [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * (@dvankooten)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/disabling-php-execution-in-uploads/#post-13676436)
 * Hello [@davemccourt](https://wordpress.org/support/users/davemccourt/),
 * Sorry, allow me to correct my colleague here.
 * **You can safely turn off PHP execution for the uploads directory even with Koko
   Analytics enabled.**
 * We only use that file for temporary data storage.
 * The file has the PHP extension because we add a first line containing `<?php 
   exit; ?>` which makes the file immediately exit when requested by a browser, 
   thus making the file unreadable. Without this line someone could use it to guesstimate
   how much visitors your website is getting.
 * So if you do turn off PHP execution, I recommend blocking access to that file
   in some other way (in your htaccess, for example).
 * I hope that clarifies. If not, let us know please.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Disabling PHP execution in /uploads/’ is closed to new replies.

 * ![](https://ps.w.org/koko-analytics/assets/icon.svg?rev=2980600)
 * [Koko Analytics - Privacy Friendly Statistics for WordPress](https://wordpress.org/plugins/koko-analytics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/koko-analytics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/koko-analytics/)
 * [Active Topics](https://wordpress.org/support/plugin/koko-analytics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/koko-analytics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/koko-analytics/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/disabling-php-execution-in-uploads/#post-13676436)
 * Status: resolved