wordpress - Unable to access analytics.txt once uploaded, returns 404 -


i've been asked add analytics.txt file wordpress website i've created file , uploaded server document root when go via url www.examples.com/analytics.txt 404 error.

i've checked file permissions , i've cleared wordpress cache neither have helped. ideas?

the folder structure follows:

wp-admin wp-content wp-includes analytics.txt    <-- added file, cannot seem access via web browser index.php etc... 

this not solution work-around while carry on trying figure out why wordpress won't allow me access file.

so if you're desperate , have sorted right now, here do, warn you, it's ugly! open index.php file , should see this:

<?php define('wp_use_themes', true); require( dirname( __file__ ) . '/wp-blog-header.php' ); ?> 

make backup copy first , add wrapping if statement:

<?php if ($_server[request_uri] == '/analytics.txt') {     die('put text instructed put analytics.txt file in here'); } else {     define('wp_use_themes', true);     require( dirname( __file__ ) . '/wp-blog-header.php' ); } ?> 

like said, dirty solution when needs must , client getting impatient, in mean time.

hoping have better solution though!


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -