404 Not Found & 500 Internal Server Error from Bwp Google Xml Sitemaps & WP Robot Plugins

I just did server migration for my wpmu subdomains on a single domain. And I really appreciate the hard work of rtcamp-team in creating this excellent script.

Previously I was using nginx + phpfpm, but due to its bad performance, I migrate and use ee for system installation. I install wordpress using:

ee site create domain.tld --wpsubdom --wpfc

After a successful migration, I found some of WP plugins do not work well:

1. Bwp Google Xml Sitemaps Plugin

This plugin works to generate virtual robots.txt, sitemapindex.xml, and post.xml for each subdomain. This stores cache file in:

/var/www/domain.tld/htdocs/wp-content/plugins/bwp-google-xml-sitemaps/cache/

After migration, the file (robots.txt, sitemapindex.xml, and post.xml) could not be accessed anymore, and got “404 Not Found” if accessed from browser.

2. WP Robot 3.66 Plugin

I use WP Robot to generate articles from amazon. The problem is when I use cron job for autoposting in WP Robot, WP Robots’ cron.php can’t function anymore. Cron Commands for WP Robot is:

wget -O /dev/null http://subdomain.domain.tld/wp-content/plugins/WPRobot3/cron.php?code=UNIQUECODE

When run in the terminal, an error message appears:

Resolving subdomain.domain.tld (subdomain.domain.tld)... XX.XXX.XXX.XXX
Connecting to subdomain.domain.tld (subdomain.domain.tld)|XX.XXX.XXX.XXX|:80... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
ERROR 500: Internal Server Error.

So, please I need advice to fix this.

regards, Muftie

So, I have to answer my own question :smile:

Finally after several search, googling, try and error, I found the answer:

1. Bwp Google Xml Sitemaps Plugin

In order for this plugin to work, I have to comment all the lines related to yoast sitemap on wpcommon.conf, like this:

# Yoast sitemap
# location ~ ([^/]*)sitemap(.*)\.x(m|s)l$ {
#    rewrite ^/sitemap\.xml$ /sitemap_index.xml permanent;
#  rewrite ^/([a-z]+)?-?sitemap\.xsl$ /index.php?xsl=$1 last;
#    rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
#    rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;

  # Following lines are options. Needed for WordPress seo addons
#  rewrite ^/news_sitemap\.xml$ /index.php?sitemap=wpseo_news last;
#    rewrite ^/locations\.kml$ /index.php?sitemap=wpseo_local_kml last;
#    rewrite ^/geo_sitemap\.xml$ /index.php?sitemap=wpseo_local last;
#    rewrite ^/video-sitemap\.xsl$ /index.php?xsl=video last;

#    access_log off;
# }

2. WP Robot 3.66 Plugin

I found that to get wprobot working through cron job, wp robot cron.php need to access wp-config.php on the root of website. But easyengine has moved the wp-config files to the upper directory. That’s why wprobot showing error.

And my temporary solution is to copy wp-config file from the upper directory to the root directory of my wp web.

I know this is not the perfect solution, since I’m not a programmer, just an ordinary bloger. Perhaps there is a more appropriate solution, I’m waiting for your suggestions.

@muftie

First Sorry for this late reply. And very glad to know your problem solved.