[Other] problem with multisite and yoast file editor

I have a problem with clients site that is located on my multisite. I instaled yoast plugin but there is no function to edit file under tools. I tried to install it on network level and on network level that function is  there. So my question is why is there file edit on network level but not on one site? And how to enable  that function.  That function is used to change and create robot.txt files.

  • Jack Alltrade
    • WordPress Warrior

    I think it’s a security issue like theme files not being editable by default.

    You can log into your Hosting dashboard, go to tools and then select file editor, if you tab it’s not much different than editing directly via WP. I have noticed the edit option won’t be available with empty files. As a work around, I upload a file that has something commented out.

  • Mhamdi Youssef
    • Support Agent

    Hello Dejan !

    Hope you are doing well!

    Since Yoast is not our products we are trying to help from Yoast resources and documentations, and I checked a case that seems to be like your issue, you can read it here:
    https://wordpress.org/support/topic/admin-subsite-owners-to-manage-their-robot-txt-file/

    I will be quoting from their support:

    Yoast SEO does not have a feature to allow subsites to edit a separate robots.txt file. This feature is only available for the main site from the Network Admin dashboard > SEO > Edit Files.

    There is a feature request to add support for robots.txt files for each subsite in this GitHub issue. https://github.com/Yoast/featurerequests/issues/277. (this link is no longer working)

    We’re not working on it at the moment but you can turn on notifications or add a comment to keep track of this issue’s progress.

    As an alternative, you can manage visibility for pages in search results by using the existing Yoast settings under SEO > Search Appearance or in the Yoast SEO metabox under the Advanced tab. Read more in this article: How to noindex URLs.

    That being said, I tried to install the plugin and give it a test on my test site and couldn’t find a way to enable robots for subsites or workaround it.

    Please, should you need any further information about the plugin, kindly contact Yoast Support and they should be able to help further as it is their products and they most likely have some snippet or some workaround that fixes your issue here.

    Hope you have a nice day ahead!

    Kind regards,
    Youssef