WordPress theme editor is missing - wordpress

I am trying to access the theme editor in WordPress.
The problem is that I cannot find the option under Admin-Appearances - Editor and when I try to access the page using the link http://www.nameofsite.com/wp-admin/theme-editor.php I get the error:
You do not have sufficient permissions to access this page.
I am logged in as an administrator. Why can't I find the editor option?

It is probably because of iThemes Security and its settings. So yeah, just go to wp-config and change DISALLOW_FILE_EDIT to false.
define( 'DISALLOW_FILE_EDIT', false );
Or just switch it off here:
Dashboard -> Security -> WordPress Tweaks -> Configure Settings
Uncheck: Disable File Editor

Open up your wp-config.php file, and search for
define('DISALLOW_FILE_EDIT', true);
Change true to false:
define('DISALLOW_FILE_EDIT', false);

For those who are using Siteground hosting define('DISALLOW_FILE_EDIT', false); won't work. Sitegound hosting provide SG Security plugin by default on direct WordPress installation from cPanel and it blocks the Theme Editor and Plugin Editor option by default.
To enable the Theme Editor and Plugin Editor option you just need to disable the option called Disable Themes & Plugins Editor under Site Security. Here is the path to disable that option :
Click on SG Security -> Site Security -> Disable
Themes & Plugins Editor Option
That's it. I hope you find it useful.

If you used Siteground host.. you can enable theme editor that option:
Go to domain.com/wp-admin.php
SG Security
Site Security
Disable Themes & Plugins Editor Option
I hope this is useful for you.

Hack:
Manually browse: domain.com/wp-admin/theme-editor.php

At root directory of your wordpress. Open up your wp-config.php file, and search for
define('DISALLOW_FILE_EDIT', true);
Change true to false:
define('DISALLOW_FILE_EDIT', false);

To enable the theme editor, follow these steps:
Go to Appearance, select one theme (any one you like) and activate it.
In this activated theme, go to Appearance → Editor → select the theme to edit (on the top right, above Templates. There is a drop-down click on it and select your previous theme.)
Now select config.php or demo config.php and remove the define ( 'DISALLOW_FILE_EDIT, true); code.
Now click on Update file.
Now change the theme to your previous theme.
Now you can find your editor in the Appearance drop-down.

The Sucuri WordPress plugin will also disable the editor in its settings under the "Hardening" tab. You can click on Revert Hardening, make your changes, and then go back and apply hardening when you're finished.

Remove both codes
define('DISALLOW_FILE_EDIT', false);
define('DISALLOW_FILE_MODS', true);
After this just refresh, the dashboard Theme editor will appear.

It is also possible that it is being blocked by a security plugin or the like. In my case SG security (from siteground) had an option active that deactivated the editor.

Related

From my admin section, I cannot add new plugin and new theme (wordpress

In wordpress, From my admin section I dont have the add new plugin button, add new theme button and some plugin cannot be use ... Any ideal why?
Screenshot:
https://snag.gy/j1Dwxr.jpg
Your help will be appreciated .. I cannot find a fix for this..
Thanks in advance !
1.) Make sure you account is an administrator account
2.) Check with your hosting provider to see if they allow you to install plugins and themes, they may disable your ability to update/install plugins and themes via your wp-config.php
define( 'DISALLOW_FILE_MODS', true );
https://codex.wordpress.org/Editing_wp-config.php

Can't upgrade WordPress or add new plugin while logged in as admin (using Sage theme)

I am logged into a WordPress site backend as an administrator. The theme was built using the Sage Starter Theme.
During development there was no issue with adding plugins or upgrading the core, but since moving to production, there is no "Add New" button for plugins and the upgrade message reads "WordPress 4.3 is available! Please notify the site administrator."
I tried manually changing the db_version field of the wp_options table to force a database upgrade. This didn't work.
I tried disabling all plugins and changing to the twentyten theme - this did not work.
Checked all permissions on the server - no joy.
How can I resolve this issue?
The latest Sage Starter theme uses a .env file to set up environments via the phpdotenv library. It lives in a directory above the public HTML web root of the WordPress installation.
If you changed the line WP_ENV=development to WP_ENV=production in the .env file when the site went live, then it's likely this is the source of the issue.
If you look at the actual configuration for the production environment in /config/environments/production.php, you see the following:
define('DISALLOW_FILE_MODS', true); // this disables all file modifications including updates and update notifications
This tells WordPress not to allow manual addition of plugins or allow core updates. You can simply edit this to be:
define('DISALLOW_FILE_MODS', false); // allow file modifications including updates and update notifications
After you've modified the core or added plugins, you can simply change it back if you don't want admins to have this power, but a better solution would be to install a capability manager plugin and define an admin role with slightly lower privileges.
For anyone else with this problem, there is another line that you may have to find in your wp-config or functions file and change to false:
define('DISALLOW_FILE_EDIT', true);
I can't find the line define('DISALLOW_FILE_MODS', true); or define('DISALLOW_FILE_MODS', false); in my wp-config.php file.
My solution: I just added the line define('DISALLOW_FILE_MODS', false); in wp-config.php file after define('DB_HOST', 'localhost'); /* or anywhere */
That SOLVED my problem and I was able to update again core, theme and plugins.
In my case, the problem was caused by the removed permissions for my "administrators" user group.
More exactly the update_core were missing in wp_options table option_name = %wp-table-prefix%_wp_user_roles
The easiest way to fix it is to install PublishPress Capabilities plugin and you can find it in the "Admin" tab. First, click black X (negate all) and save and then you can enable it.
The same maybe for plugins and themes updates.

Editing wordpress theme with dashboard

I created sample website in wordpress.I'm newbie.I want to edit it again.Now the website show without dashboard.how to bring back edit option to that wordpress theme.Now This shows only web page
I think you are reffering to wordpress built in file editor. By default it is enabled, but if somehow it has been disabled you can enable it by going to wp-config.php and add this code to the top.
define( 'DISALLOW_FILE_EDIT', false );

Wordpress don't have plugin tab on dashboard

I'm logged in as the administrator,
my site is self-hosted (the url is www.domain.com )
I'm not the one who built the site and I cant contact him,
this is the first time that I'm trying to install a plugin so I have never checked if it exists or not before today.
the problem is in the local version and in the online version.
thanks :-)
Since your site is self-hosted, you can navigate to the folder wp-content -> plugins and add "zzzzz_" to the front of all plugins. This will disable all plugins without breaking anything. From there, see if your Plugins tab returns in the WordPress backend. If nothing happens, change the naming structure back.
After that, you'll want to download all of the files from your theme, which can be found in wp-content -> themes -> YOUR_THEME_NAME. From there, download the files, and KEEP A BACKUP. The file you'll be looking for in your theme is functions.php. Use CTRL + F (or whatever the search is in your favorite text editor) and find remove_menu_page( or add_action('admin_menu'. You'll want to look for something referencing plugins. This site has some information on how to remove the plugins tab. There should be code using some of these functions specifically set to remove the plugins menu from your admin.
Try to disable all plugins, and see if the tab return
You can do this only in this way: http://www.wpbeginner.com/plugins/how-to-deactivate-all-plugins-when-not-able-to-access-wp-admin/
Try to change theme,too.

How can i change the theme for a site from front end in wordpress?

In my wordpress site i have 10 themes. I need to change the themes by clicking the link from the front end site.(Normally we change the themes in admin login). I need to change the themes without login in to the admin panel.
Is that possible?..
Install the Theme Switcher plugin and it will print out a list of your themes in your sidebar and users can click the links to make the switch. See more about Theme Switching in the WordPress Codex.
If you are not administrator or permitted by administrator then it is fully impossible .If you are permitted to change then simple go to dashboard then go theme option and change it.

Resources