askvortsov
something like this?
FoF Sitemap
Braden yes, but you need to include the full path to the flarum
executable file.
I selected once per hour, so maybe i should now wait in the next hour sitemap.xml will show up?
- Edited
Braden not quite, the path should go before the flarum argument, not before the php argument.
I'd also recommend running the command outside of a cron job. That should generate an initial sitemap.xml. If that doesn't work, it won't work in a cron job either.
- Edited
askvortsov interesting !
now for example php flarum fof:sitemap:cache --write-xml-file
To look like
php /path/ flarum fof:sitemap:cache --write-xml-file
Braden no space should be inserted before the path and Flarum. flarum
is a file (without any extension), so you essentially need php <path to flarum file> fof:thecommand
, like php /var/www/public_html/flarum fof:command
That being said, you don't need both commands. The first one is to generate a single large XML file. The second will generate multiple XML files. Assuming you want the multi-files variant, you can remove the first and keep the second.
Having both commands running at the same time would probably end up messing up the main sitemap.xml
file.
clarkwinkelmann i decided to just choose a single xml . what about now?
php /home2/soprizac/public_html/flarum fof:sitemap:cache --write-xml-file
Try running the command on the command line to see if it works. It should work when ran from any place in the filesystem, not just the Flarum folder. If it works that way, then you can be pretty sure it will work in the CRON.
If you're unsure if the CRON works, delete the sitemap and see if it's created. If there are errors in the CRON you cannot replicate out of the CRON, you can try logging the output of the CRON. I see cPanel might even send you an email with the output automatically in the documentation askvortsov linked. Otherwise there should be tutorials online for how to redirect the output of a CRON task to a file.
clarkwinkelmann i deleted old sitemap.xml and fixed the path in cron job but still new sitemap.xml isnt generated sir. Could i be missing any extension or something? like a scheduler
Braden what is the output of the command when you run it manually?
- Edited
clarkwinkelmann sorry late reply . I had forwared a ticket to my host to set cron job the did it today. Like this
0 * * * * cd /xx/xx/public_html && php flarum fof:sitemap:cache --write-xml-file
running the command manually on cpanel how do you do that? by the way it hasnt created any sitemap file yet
Braden did you install Flarum from the command line? Connect to the same command line and try running the command. Same way you would install Flarum extensions.
You might have an "SSH" or "Shell" access right from cpanel (I never used it, but I know some managed hostings have online command line clients), otherwise you likely connected with an SSH client like Putty.
clarkwinkelmann i tried that and it bounced neaty like this
- Edited
Braden was the sitemap.xml
file created?
If it worked that way, it should work in the CRON.
If it works on the command line but not in the CRON, check your Flarum log file for errors. If that still doesn't help, you will probably need to try to redirect the output to a log file with >
(and also redirect errors with &2>
or something like that, I can never remember how to write it) so you can inspect the output.
EDIT: also check which linux user your CRON job runs at. Ideally it should be the same user that you use for SSH login. If it's a different user, it might be unable to write the xml file to disk, and if so will likely not be able to write to the log file either.
clarkwinkelmann buddy i found this one in storage
Don't want to bother anyone, but there are any plans for a beta.16 update?
- Edited
- Edited
this is part of FoF so I'm sure it will...eventually. They just finish beta 16 last week, I'd give them some time to take a break The SEO extension is already updated, I don't see any reason why this wouldn't be.
hello thanks, I really love this
am new to Falrum and I have been installing some extension but this one gave me an error see below
``Using version 0.6.0 for fof/sitemap
./composer.json has been updated
Running composer update fof/sitemap
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires fof/sitemap 0.6.0 -> satisfiable by fof/sitemap[0.6.0].
- fof/sitemap 0.6.0 requires flarum/core >=0.1.0-beta.15 <0.1.0-beta.16 -> found flarum/core[v0.1.0-beta.15] but the package is fixed to v0.1.0-beta.16 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.``