If your WordPress site is installed in a subdirectory, such as example.com/blog/, your sitemap will be generated at example.com/blog/sitemap.xml by default. However, if you want to move your sitemap to example.com/sitemap.xml, you can do so by entering “https://example.com/blog/” in the “Override the base URL of the sitemap” field on the plugin settings page.
Since my WordPress in in https://www.sinapsi.org/wordpress/
and I want to move the sitemap to https://www.sinapsi.org/
I should enter “https://www.sinapsi.org/” in the “Override the base URL of the sitemap” field on the plugin settings page and not https://www.sinapsi.org/wordpress/ as written in the FAQ.
Moreover I read the rewrite rule to add to .htaccess file and again I am puzzled since I should use the root address so I don’t understand what should I write instead of “/your-blogdir/”
<IfModule mod_rewrite.c>
RewriteEngine OnRewriteRule ^sitemap(-+([a-zA-Z0-9_-]+))?\.xml(\.gz)?$ /your-blogdir/sitemap$1.xml$2 [L]
</IfModule>
And why “This rewrite rule will redirect requests for the sitemap from example.com/sitemap.xml to example.com/blog/sitemap.xml.” ?
I think the rule should redirect from: example.com/blog/sitemap.xml to the root: example.com/sitemap.xml
]]>My WP site is installed in my root directory in the /public_html folder.
I saw that moving it into a subdirectory is very simple as per this article (Method I)! And I would like to do so since the WP files tend to clutter things up quite a lot.
My question is the following: If I have other folders in the /public_html (root) folder, how will I be able to access them?
For example, if I put WP in a subdirectory such as the /public_html/wp folder, and decide to redirect my domain there (https://www.example.com will lead straight to /public_html/wp), then will I be able to access folders such as /public_html/gallery ? With what URL structure?
Thank you!
– Gaurav.
ETA: I realize this is a somewhat ironic thing to say here where the font-size is even smaller than Hey’s.
]]>We are looking to configure the plugin to also include the cookies on our client’s sub-domain. In order for that to happen, the acceptance cookie “hu-consent” has to be set on the root domain (.example.com) instead of the current www.example.com domain.
You mention in the plugin description that you include multisite / domain support. How does that work exactly? Currently, we cannot see any options enabling this.
]]>All my site files are in example.com/subdirectory, but the site shows in a browser as being in the root directory example.com.
WP Meta SEO offers to me the link of XML Sitemap as example.com/wpms-sitemap.xml. If I click the orange button “Open”, I get the 404 error.
Being in the server file manager, I can find the file wpms-sitemap.xml in the example.com/subdirectory.
The site’s copy, which files are in subdirectory and which shows also in a browser as being in the subdirectory, there the WP MS sitemap can be opened and all is right.
I use Classic Press 1.4.1, based on WP 4.9x.
The .htaccess is:
# BEGIN ClassicPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END ClassicPress
]]>It’s not clear to me in this WP article, specifically the section .htaccess modification, what it refers to? Is it referring to separate versions of WP, site content or both? If it’s both, should it not be associated with Method I in the article? The way this section is presented, it seems to be a sub-heading of Method II. If it’s not both, which is it referring to content or WP? The way it’s written, it seems to be about WP. Wouldn’t annual content versions be of more interest?
The section as it’s written is ambiguous and confusing. Can you please clarify the intent?
]]>I have several shared hosting servers that are built on CloudLinux and WHM/cPanel and the user accounts do not have shell access. I also have a script that allows me to quickly install WordPress on a user account, but it is pretty raw and could be vastly improved with WP CLI. I login via SSH with EC key pairs, and there is an external gateway/firewall in front of the servers that allows port 22 only from specific administrative IP addresses. So my administrative user is the root user. I currently run my script as root.
The wp command throws up a strong warning about running as root. It suggest I use the command sudo -u USER -i -- wp <command>
instead. To do so I would have to enable jailed user shells for all users. Due to a feature in CloudLinux called Link traversal protection and the way it manages chroot filesystems between users, doing so forces you to choose between two bad options, both of which I would like to avoid.
Running instead as sudo -u USER wp <command>
allows it to run without the interactive user shell and it will then work without having to enable jailed user shells for all users. The users exist, but by dropping the -i
switch and the double hyphen I am not requiring an interactive login shell.
So what are the consequences of using the wp command without the interactive login shell. Will using sudo -u USER wp <command>
instead of sudo -u USER -i -- wp <command>
break anything?
Thank you.
]]>After checking the folder, I had indeed changed the permissions from the usual ones (www-data) to new ones (root).
I corrected the permissions, deactivated and activated the plugin, and everything was correct. Everything worked correctly until moments later, it changed the permissions again. It only changes the permissions of the Autoptimize folder, the rest of the files and folders remain correctly.
Any idea why this might be happening?
]]>