Roots Discourse

How to remove Sage from ftp?

Hi,

I came across an issue I cant solve myself. I need to remove sage from ftp.
It was instated by previous dev. and I am not using it at all and using different theme.
However sage just sits there in my ftp and as I was informed the reason I can see theme editor in my WP admin is exactly because of sage. The same reason why I can find in ftp wp-confing.php.
As you can say by now I am not that advanced like most of you (one of the reasons I am not working with sage), so if I may ask you help me to get rid of it so I have regular wp installation where I can navigate myself.

Thank you in advance!

Vit

Hi. I think there are a few things going on here:

  1. Sage is just a WordPress theme. If it’s not the active theme, it won’t affect the site at all. So the reasons you don’t see the Theme Editor, and the reason you don’t see wp-config.php aren’t because of Sage. A deactivated Sage theme won’t cause the issues you’re seeing.

However,

  1. It sounds like your site might have been built with Bedrock. Bedrock is a WordPress boilerplate which makes WordPress behave more like a Laravel app; it moves WordPress into a subdirectory (/wp/) and manages configurations, like those usually found in wp-config.php, with .env files instead.

So I think the problem you’re describing is because your site is built with Bedrock.

The best way to convert your site from Bedrock to standard WordPress is to simply set up a fresh copy of WordPress, install all your needed plugins, install your theme, and import your database.

You’ll need to search-replace your database:

FIND

example.com/wp

REPLACE WITH

example.com/

You can accomplish this either with wp-cli or with Search Replace DB.

I hope this helps at least a little.

2 Likes
Wow, I didnt expect such a fast answer and good one at the same time. It is true the original theme was labeled sage in wp themes but I also find in ftp some .env files instead and also I notice following two plugins in Must-have plugins in wp admin Bedrock Autoloader (bedrock-autoloader) - Version 1.0.0 Active
Register Theme Directory (register-theme-directory) - Version 1.0.0

Non of them is possible to delete. All that is making me very confused.

I have a question. If I will leave it like its (at least for now) , can I make wp-config.php and Theme Editor in wp admin somehow visible or it can be done only after steps you described?

I just have to say I already deleted
define( 'DISALLOW_FILE_EDIT' , true );
define( 'DISALLOW_FILE_MODS' , true );
from several places because I believed that is what causing the problem but still nothing.

Thank you a lot for help!

Vit

Hi again,
You can leave it as-is, but I would recommend converting it to normal WordPress rather than fighting with Bedrock.

If you decide to stay with Bedrock, try changing the following two lines:

In /config/application.php, find

// Disable the plugin and theme file editor in the admin
Config::define('DISALLOW_FILE_EDIT', true);
// Disable plugin and theme updates and installation from the admin
Config::define('DISALLOW_FILE_MODS', true);

Change to

// Disable the plugin and theme file editor in the admin
Config::define('DISALLOW_FILE_EDIT', false);
// Disable plugin and theme updates and installation from the admin
Config::define('DISALLOW_FILE_MODS', false);

Rather than deleting the lines.

2 Likes

For now I will stay with your suggestion. I am a still newbie so I will do that change once I will be more sure with what I am doing.

It was really helpful!!!

Vit