Why is the theme editor not showing up?
-
Hello, the theme arrangement of my site is missing. How can I solve this? After logging in there is theme information. but there is no theme editor.
-
Do you meant the theme file editor or the site editor? With block themes the theme file editor is hidden because your’re expected to manage customization through the site editor. You can still access the file editor by requesting the correct file — /wp-admin/theme-editor.php
Or switch to a non-block theme and access the theme file editor that way. You can then select any installed theme for editing.
@bcworkz There is a problem with the site. The theme editor does not appear on the site. No blockless theme or default theme has been installed before. Additionally, the site has been updated for 1 year. I saw that there were spam articles written on the site.
Oh! If unauthorized content has been added to your database, your site has been hacked. Your site is likely corrupted in a number of ways, including the addition of hidden “back doors” that allow the hacker to easily gain access even after you’ve changed all passwords. Your site will need to be properly cleaned before you can regain complete functionality.
I recommend you work through the steps outlined in FAQ: My Site was Hacked. Good luck!
@bcworkz . This is quite difficult to do. I will set out without knowing how I will succeed.
Yes it is difficult. You will eventually succeed at the cost of time and/or money. Hacks vary in their sophistication. In some cases replacing your core, plugin, and theme files will be enough. More or less a manual update process, except you’re using the same version.
Other hacks can be difficult to find and remove, they’re well hidden. Some examples of the difficulty are explained in this article from OttoPress. If you have good backups, wiping everything out and restoring from backup is a reliable technique. But only available for those with good backups.
If all else fails, you can hire an expert to clean your site for you. Several recovery services are available by searching. One example is Sucuri.
@bcworkz . I installed a security plugin. This didn’t help me at all. Even when he scans it, nothing comes up. He gave me a deadline of 1 month. Anyway, thank you for addressing the issue. However, it drives me crazy that my theme editing section does not appear on the site. How can I quickly change the database name or username?
Use FTP or your hosting file manager to download your site’s wp-config.php file to your local computer. Edit as desired with a plain text editor, then upload back to the server.
@bcworkz please look at this picture. There are always gaps in transitions to db users and others. Do you think these are normal? While editing, should I download a new updated WordPress, take the config in it and save it?
Gaps? Do you mean the empty lines between definitions? Those are fine, white space is ignored by PHP, it’s only there to make the code more readable. Below is a screen grab of the unaltered sample config file as provided by the English version of WP. Your version should appear similar except the comments are in a different language and the defined values will be unique to your site.
Replacing your core WP installation with files from a new up to date download might be a good thing, but you wouldn’t be replacing your wp-config.php in any case. It contains important information about your site’s DB connection that is not available elsewhere on your server.
If you want your site to use a different DB connection, I recommend first making a backup copy of your current file. Then change the defined values as appropriate, then upload back to your server.
Unless the DB you’re changing to already has existing WP data in it, you’d essentially be creating a new site and you’ll need to run the /wp-admin/install.php start up app.
hi. @bcworkz . Yes, I mentioned gaps. because there is no space in the config file of my other website. Also, should I edit the login name I entered as a WordPress administrator with the “config” found here? Or is it another way? Also the other problem is auto key. I think it will not cause a problem if this auto key is replaced with the new updated config?
Also, isn’t there a big problem in this picture? What is this that I don’t understand? I did a lot of research and no one even published it. I type the password and it is the correct password. If you are asking how did you make sure it was correct, I refresh the page in the browser after this error and when I refresh it, I reach the panel. So if I enter it wrong, when I refresh it, it doesn’t log in. but if I enter it correctly, I get this error and have to refresh the page to log in.
Whether gaps appear or not depend on your computer’s O/S. Win boxes use both return and new line characters at the end of every line, various ‘nix systems only use a single new line. When a ‘nix system edits a file edited earlier in Windows it interprets the extra return character as an extra line or “gap”. Fortunately PHP doesn’t care how may white space characters there are.
Auto key? I suppose you meant “AUTH_KEY”. It’s defined value can be any string value. The best security is achieved by it being a somewhat long string of random characters like those generated on this page. The only thing that happens when these key values are changed is it invalidates any current cryptographic hashes like your auth cookie, causing you to need to log in again.
The DB user name and password defined in wp-config.php don’t have anything to do with WordPress users. You need to use the user and password that’s defined for your DB. Your hosting account usually has a UI somewhere in the control panel where DB users are configured. Usually your hosting account assigns one user by default whose password is the same as your hosting account. Other users may or may not be defined.
If the DB user is not the default one, be sure it has adequate permissions to administer your WP DB tables. In theory it’s possible to create a WP user that has the same name and password as the DB user, but it’s inadvisable for security reasons.
If you changed to a different DB, it possibly does not contain the same user and password information. Thus whatever your login was might no longer be valid. As long as you have access to your hosting account or the phpMyAdmin app you can reset a user’s password so you can gain access to your WP back end. Several possible techniques are described here. If you know which user is defined and can receive that user’s email, use the normal password reset method. Otherwise I personally prefer the phpMyAdmin method, though any of the methods described could work.
What’s good about the phpMyAdmin method is you can see what users are already defined. If you are unsure which is the admin, look at the usermeta table. Search for all records with meta_key = ‘wp_capabilities’. Look for records that have “administrator” within the meta_value. Note the related user_id value and look in the users table for the user_login associated with the user_id or ID. That’s a user whose password you could reset to gain admin access to your WP back end.
@bcworkz What you say is important to me. Thank you for this long answer. But it will take me a long time to check and replace them. I have access to phpMyAdmin. You say it would be better if I change the username there and try it. I remember that I changed it from the wordpress panel before. You say that when I write a new username in phpMyAdmin, the WordPress panel name will be the same. I will try every note of yours carefully in the future.
You say it would be better if I change the username there and try it
That’s true, but it’s more nuanced than that. If you can access the WP admin panel then that’s the best place to manage users. phpMyAdmin is very useful if you cannot access WP admin or you want to do something that WP admin will not do.
phpMyAdmin is a very powerful tool. You can do much good with it, but can also cause great harm to your data. Unless yo’re absolutely sure a change is harmless, always export a backup copy of the DB before making any changes. Good luck!
bcworkz I have access to everything. But the important thing is to manage. The first question I asked you was about the theme editor. I still haven’t figured this out. I connected with filezilla and the theme editor appears. That is, you stated that there will be no problem if the theme editor on the site does not appear. When I founded the site 7 years ago, the theme editor was active on the site. But now it only appears with filezilla. If it’s okay, let’s keep it that way.
- The topic ‘Why is the theme editor not showing up?’ is closed to new replies.