• TL;DR: The plugin doesn’t work, it doesn’t write the sitemap file for some reason or another (no error messages in PHP log files, most likely suppressed to make it look like it works).

    I’ve installed this two weeks ago to hopefully get WordPress to generate a sitemap (Why isn’t this a core feature again?). When I tried looking at the sitemap, the file doesn’t exist. It’s never written and there are no error/warning messages logged, so I don’t even know if it’s shitty coding (supressing error messages usually is shitty coding) or a configuration error (that would be the first one in 8 years now).
    Would not recommend until it either gives you an option to see why it’s not working, or actually starts working in an environment that nothing else has trouble with.

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter Xaymar

    (@xaymar)

    I also tried the ?feed=sitemap thing, and it just returns an empty page and the error log for fastcgi says that there was no response from the upstream host(PHP). Not the greatest thing to happen, I’m probably better off writing my own plugin for this.

    Hi Xaymar, please don’t use the reviews section for support request. It’s not really fair to blame a plugin when your upstream php host does not seem to be configured correctly.

    This plugin does not create or write any files. It creates feeds. If you see an empty page, it might mean that the stylesheet (for human readability of the XML source) is not passed correctly which does not hinder your sitemap from being read by search engines.

    If you need help, please create a thread on the support forum.

    Thread Starter Xaymar

    (@xaymar)

    You’re assuming that the upstream php host is configured wrong – that would mean that I’d get an error message instead of an empty page. (Also, not writing or using a unix-socket/pipe-stream sitemap.xml is really an odd idea, but yours to make so meh)

    Also, even Google Webmaster Tools was unable to read the sitemap, so yeah. Not working, in the slightest. I can send you the cleaned (removal of identifying data) error logs if you so desire, but they are mostly 0 bytes big.

    …that would mean that I’d get an error message

    That’s exactly what you said in your second post:

    …the error log for fastcgi says that there was no response from the upstream host(PHP).

    How did I misread that?

    Also, even Google Webmaster Tools was unable to read the sitemap, so yeah. Not working, in the slightest.

    Like I said, create a thread on https://wordpress.org/support/plugin/xml-sitemap-feed or at least provide a link to your sitemap so it can be studied live if you want help.

    Thread Starter Xaymar

    (@xaymar)

    …the error log for fastcgi says that there was no response from the upstream host(PHP).

    How did I misread that?

    You did not misread that, however in my configuration setup, that means that the php-file being executed terminated early, either by the script or the fpm-handler for taking too long (second one would trigger a php.slow.log entry, which doesn’t happen – i.e. for some reason your php script or template manages to terminate the entire process, which is not logged).

    I’ve moved the php controller out of the chroot and it works there, but I can’t keep it there for long – too insecure.

    Also, the requested links:
    http://project-kube.de/sitemap.xml
    http://www.project-kube.de/sitemap.xml
    http://project-kube.de/www/sitemap.xml
    http://project-kube.de/?feed=sitemap
    http://www.project-kube.de/?feed=sitemap
    http://project-kube.de/www/?feed=sitemap

    Edit: As soon as I put it back into the chroot, it just stops working again. PHP, nginx, MySql are all up to date from sources.

    OK, let’s ignore all www subdomain and subdirectory URLs there because http://project-kube.de/www/ and http://www.project-kube.de/ return 404 WordPress pages too (why do you not 301 redirect www to non-www?) and concentrate on the working http://project-kube.de/?feed=sitemap … this shows the sitemap feed is there and it’s functional.

    Now the pretty permalink: http://project-kube.de/sitemap.xml

    This shows an Nginx 404 repsonse which indicates Nginx does not pass the request to index.php … but to let WordPress handle a request for this URL, it MUST be passed to index.php

    I advise at least following the General Rules on https://codex.wordpress.org/Nginx where it is important to have:

    location / {
    	try_files $uri $uri/ /index.php?$args;
    }

    and make sure you do NOT have xml in the regexp match rule

    # Directives to send expires headers and turn off 404 error logging.
    location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
           access_log off; log_not_found off; expires max;
    }

    But I can really recommend following https://rtcamp.com/wordpress-nginx/tutorials/ which if you decide to start using easyengine is the absolute top in easy Nginx server management πŸ™‚

    Edit: As soon as I put it back into the chroot, it just stops working again. PHP, nginx, MySql are all up to date from sources.

    Are all public files (in /var/www/wherever) chown’d to www-data:www-data and do you have in your PHP’s http://www.conf the following?

    listen.owner = www-data
    listen.group = www-data
    listen.mode = 0660

    Also make sure that if you install plugins via (S)FTP, the user and group are www-data too…

    Thread Starter Xaymar

    (@xaymar)

    Yeah, the domain is currently outside of the chroot, that’s why it works. It stops, or stopped as you will soon learn, after moving it back into it. I ‘fixed’ it by removing all blacklisted php commands and then moving it back to the chroot, though I’m not sure why that works. At least it’s working now, even though it’s insecure.

    (I don’t use EasyEngine, I have a custom built setup that is designed to serve content as fast as possible from multiple other servers and itself. Using a panel would just make things more difficult for me.)

    Unfortunately I can’t edit the review so people will have to look at the comments: Plugin works, but for some reason occasionally requires the blacklist to be removed from php.

    What PHP commands get blacklisted? And what is doing this blacklisting?

    I have a custom built setup that is designed to serve content as fast as possible from multiple other servers and itself.

    A separate DB server? If so, then just set up the MySQL (or MariaDB) service and connection first and easyengine will detect it, consider it installed and not touch it further.
    A CDN for static media files? Why not add W3TC or Super Cache and you can set everything up via the WP back-end.

    EasyEngine is not a panel. It’s a command line script that automates many tasks and has defaults for very fast, WordPress optimized setings. But yeah, it’s not for managing a cluster of servers.

    Thread Starter Xaymar

    (@xaymar)

    The following functions are blacklisted (more may be statically disabled by php extensions that I cant modify):
    pcntl_alarm,pcntl_fork, pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsigna
    led,pcntl_wexitstatus, pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error, pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec, pcntl_getpriority,pcntl_setpriority

    Most other settings are at the default, with the memory limit and upload filesize being adjusted to larger files and requests. I also have the following extensions installed: curl, enchant, exactimage, gd, geoip, gmp, gnupg, imagick, imap, intl, json, ldap, mcrypt, memcache, memcached(auto installed when installing memcache), mongo, mysqlnd, oauth, pecl-http, pgsql, propro, pspell, raphf, readline, recode, redis, sasl, sqlite, ssh2, stomp, tidy, twig, xcache, xmlrpc, xsl

    The only thing that differs between the non-sandboxed and the sandboxed one is that the non-sandboxed one doesnt have a blacklist for commands.

    pcntl_alarm,pcntl_fork, pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsigna
    led,pcntl_wexitstatus, pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error, pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec, pcntl_getpriority,pcntl_setpriority

    Those are all PCNTL functions http://php.net/manual/en/ref.pcntl.php but this plugin does not use any of those. I see no reason why that blacklist would interfere with plugin operations.

    What’s your PHP memory limit and how many posts does your site have?

    Thread Starter Xaymar

    (@xaymar)

    I have set it to 32mb, usually is enough for many plugins that use the “get->work->drop->next” routine (especially in databases). Only had one plugin so far that complained about that was Jetpack.
    I have about 120 pages (~100 hidden/created & maintained by plugins) and posts on the site. If loaded all at the same time, that would go over the memory limit, but otherwise it should be fine.

    Well, it does not sound like a memory issue. And when accessed over the non-pretty URLs the feeds render just fine:
    http://project-kube.de/?feed=sitemap-posttype-page
    http://project-kube.de/?feed=sitemap-posttype-post

    The only problem I see is that Nginx does not pass pretty URL requests that end with .xml to index.php … And it seems a /robots.txt request does not get passed to index.php either which is too bad because WordPress can render a valid robots.txt response too.

    We had a similar problem with Nginx. We had to configure it to explicitly pass the the sitemap.xml request to index.php, like so:

    server {
      ...
      rewrite ^/sitemap\.xml$ /index.php?feed=sitemap last;

    Hi Brian, a simple

    location / {
      try_files $uri $uri/ /index.php?$args;
    }

    should take care of everything including sitemap-news.xml and your dynamic (WP generated) robots.txt πŸ™‚

    Thanks, @ravanh. I like that.

    Left a 5-star review for the support.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Plugin claims that it works, but doesn't write anything.’ is closed to new replies.