There are many steps of creating and submitting a sitemap to Google Search Console if your website is running on Mediawiki CMS (Content Management Systems).
How to create a MediaWiki sitemap
- Go to File Manager then Public HTML or the folder where your site is installed.
Example: example.com is installed on the public html folder while example.com/forum/ is installed on the blog folder.
- While in the same folder, create a sub-folder called sitemap
- Go to the cPanel home page and open the command (Known as Terminal)
- Copy and paste the code below in the first line of the Terminal and then click enter to run.
php public_html/forum/maintenance/generateSitemap.php --memory-limit=50M --fspath=/home/yourcpanelusername/public_html/forum/sitemap --identifier=forum --urlpath=/forum/sitemap/ --server=https://example .com/ --compress=yes --skip-redirects
- Go to the sitemap folder that you created, and you will find a sitemap that has been generated.
- Submit the .xml file to Google Search Console.
Your sitemap should look like this if you installed it in the forum folder: example.com/forum/sitemap/sitemap-index-example.xml
NOTE: You will be required to manually run the code above each day to update your website’s sitemap. If you want it to be updated automatically (like it happens with the use of WordPress Sitemap plugins), then you need to set cron jobs to update after every day.
NOTE: If you do not have access to command (Terminal) in your cPanel, then you can use cron jobs only.