Google XML Sitemaps WordPress Plugin – There was a problem writing your sitemap file. Make sure the file exists and is writable. – Solved

Google XML Sitemaps WordPress Plugin – There was a problem writing your sitemap file. Make sure the file exists and is writable. – Solved

I use http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/ for generating my XML sitemaps for search engines. This is an older plugin but is still in use by many. For quite some time I have been getting an error

“There was a problem writing your sitemap file. Make sure the file exists and is writable”

This error has been bugging me, and I figured it was a permissions issue, but that was not the case. I finally decided to debug and noticed that the plugin was having an issue while submitting my sitemap to Ask.com. Well, it turns out that Ask.com no longer asks for sitemap submissions http://www.ask.com/answers/264341/how-to-submit-sitemap-to-ask-com-when-can-i-get-a-confirmation-that-my-sitemap-is-being-accepted-by-ask-com and this explained my error.

So to solve this issue, navigate to your plugin directory at “wp-content/plugins/google-sitemap-generator/” and edit sitemap-core.php.

Simply remove this chunk of code:

 //Ping Ask.com
        if($this->GetOption("b_pingask") && !empty($pingUrl)) {
            $sPingUrl="http://submissions.ask.com/ping?sitemap=" . urlencode($pingUrl);
            $status->StartAskPing($sPingUrl);
            $pingres=$this->RemoteOpen($sPingUrl);

            if($pingres==NULL || $pingres===false || strpos($pingres,"successfully received and added")===false) { //Ask.com returns 200 OK even if there was an error, so we need to check the content.
                $status->EndAskPing(false,$this->_lastError);
                trigger_error("Failed to ping Ask.com: " . htmlspecialchars(strip_tags($pingres)),E_USER_NOTICE);
            } else {
                $status->EndAskPing(true);
            }
        }

Now the plugin will no longer contact Ask.com and hopefully everything will build for you without having to build manually!

Enjoy!

There are 4 comments .

Cogistator

Hi. I have never written a line of code in my life, BUT followed instructions and deleted the code below. And STILL get the same error. Previously, I also changed the index.php permissions to 777 (under the root folder). So I have learnt alot about things I had no clue about, but dont seem to have solved my problem 🙁 This is what I deleted: //Ping Ask.com
if($this->GetOption(“b_pingask”) && !empty($pingUrl)) {
$sPingUrl=”http://submissions.ask.com/ping?sitemap=” . urlencode($pingUrl);
$status->StartAskPing($sPingUrl);
$pingres=$this->RemoteOpen($sPingUrl);

if($pingres==NULL || $pingres===false || strpos($pingres,”successfully received and added”)===false) { //Ask.com returns 200 OK even if there was an error, so we need to check the content.
$status->EndAskPing(false,$this->_lastError);
trigger_error(“Failed to ping Ask.com: ” . htmlspecialchars(strip_tags($pingres)),E_USER_NOTICE);
} else {
$status->EndAskPing(true);
}
}

Reply »
    Brent

    Hi Cogistator,

    If you go into settings > XML-Sitemap, look for “If you encounter any problems with the build process you can use the

      debug function

    to get more information.” Try debugging this, it will spit out a long debug text message, and take a look to see if that tells you anything more, look for the word “error” anywhere, or you could try pasting it here, and I can try to help you out further.

    Hopefully we can get you up and running with this plugin, it’s very handy.

    Reply »
Zemra

I have problem with google, and since this plguin hasent been updated for a long time and on the other side google does changes every day … you cant solve the problem by removing ask from the list.

Reply »
    brent

    I haven’t used this plugin for quite some time now, but I am fairly confident there is a debug mode you can put it in. Could try enabling that and seeing what kind of error messages it gives you.

    Reply »

Share Your Thoughts!

Testimonials

What My Clients Say

Karin - Hope and Future

Brent has always been very prompt and generally exceeds our expectations with his work. His maintenance fee is very reasonable. I strongly recommend him!  We get many compliments on our beautiful web site!

Dan

I contacted Krueger Web Design and Brent did everything.  He setup a test site with the changes so we could verify everything was correct before we transferred from my old hosting provider.  During the setup and conversion Brent was extremely professional and responsive. He responded to any issues the same day.

Dan Kaufman
Emily - GFCLT

We've had a great experience working with Krueger Web Design. Prompt responses, great ideas, effective work... all at a reasonable price! This was the perfect fit for our organization.

Mahmud - ACMC

I would love to recommend you to anyone! You have been very helpful when we needed you the most.

Brian - SEMNIC

Working with Krueger Web Design was effortless. Communicating what I wanted for the website and the results that I saw were identical. The customer service was always prompt and I am completely satisfied with the product.

Zach - Stadium Club

Exactly what I wanted! Fast turnaround time and very affordable. Answered all of our questions quickly and made adjustments promptly. Very easy to work with and puts everything into terminology that even I can understand!

Contact Krueger Web Design

Have a question for me? Need an estimate on some work? You can email me at brent@kruegerwebdesign.com or drop me a line using the button below:

Copyright © 2017 Krueger Web Design - All rights reserved
Web Design in Madison, WI