<p>You can also try looking at the <code>.env</code> file for the <code>CRAFT_ALLOW_ADMIN_CHANGES</code> variable.</p>

CC BY-SA 4.0
2024-02-10T11:50:15.597Z
there are only mail settings...
Freestyle
CC BY-SA 4.0
2024-02-10T14:08:15.630Z
Can you post your general.php file?
psithu
CC BY-SA 4.0
2024-02-10T15:26:26.043Z
did it above   ...
Freestyle
CC BY-SA 4.0
2024-02-10T23:46:36.187Z
I don't remember for sure, but I think `allowAdminChanges` is set to `false` by default on production enviroments. I think in your case you just need to set it t to true in your `general.php`. 

I should add though that this is not recommended and that idealy all "admin" changes should be done locally and then deployed to production.
psithu
CC BY-SA 4.0
2024-02-11T10:47:40.737Z
It didn't work.
Freestyle
CC BY-SA 4.0
2024-02-10T10:32:54.877Z
2024-02-10T10:32:54.877Z
psithu
<p>For reasons that I cannot explain, I was unable to gain access to the standard tools for adding fields or sections on my website. Therefore, I found my own workaround. I am sharing this makeshift guide (imperfect, but better than nothing) in case someone else faces a similar situation.</p>
<h3>Instructions for Adding New Fields Directly in the Craft CMS Database</h3>
<h3>Instructions for Adding New Fields Directly in the Craft CMS Database</h3>
<p>If you do not have access to the standard tools for managing fields and sections in Craft CMS through its administrative interface, this guide will help you add new fields directly through the database. You will need access to your database, which can be obtained, for example, through tools like Adminer or phpMyAdmin. Connection details are usually stored in the dbconn.php file.</p>
<h4>Steps:</h4>
<ol start="0">
<li><p>Accessing the Database: Use a database management tool, for example, Adminer or phpMyAdmin. The connection details can be found in the dbconn.php file.</p>
</li>
<li><p>Adding a Field in craft_fields: Add a new field by defining its name (name), handle (handle), and type (type). This is a basic step necessary for creating a new field in the system.</p>
</li>
<li><p>Adding a Column in craft_content: For text fields and some other types, adding the corresponding column in the craft_content table is required, where fieldName is the name of your new field.</p>
</li>
<li><p>Setting Up Relations in craft_fieldlayoutfields: This step ensures the link between your new field and layouts, allowing the field to be displayed in the administrative interface for the respective element types (entries, users, categories, etc.).</p>
</li>
<li><p>Modifications in the Site's Output Template: Make the necessary changes to the site's templates to display the new field in the front end.</p>
</li>
<li><p>Clearing the Cache: It's crucial to clear your website's cache after making changes directly in the database to ensure that the new additions are reflected on the website. This can often be done within the Craft CMS administrative interface or any caching services your site might be using.</p>
</li>
</ol>
<h4>Additional Steps:</h4>
<ol start="6">
<li><p>Updating craft_relations for Linked Fields: If you are adding a field type like &quot;Entries&quot;, &quot;Categories&quot;, &quot;Tags&quot;, &quot;Assets&quot;, etc., that creates relationships between elements, the craft_relations table needs to be updated.</p>
</li>
<li><p>Updating craft_elements and Related Tables: For custom fields associated with specific elements, adding information to the craft_elements table and corresponding subtables (for example, craft_entries for entries) is required.</p>
</li>
<li><p>Adding a New Field Group in craft_fieldgroups: If your new field belongs to a new group of fields, add this group in craft_fieldgroups.</p>
</li>
</ol>
<h4>Note:</h4>
<p>When working with the database, always create backup copies before making changes to avoid data loss or other critical errors. Direct database manipulation can be risky, so approach this process with caution.</p>
<p>This guide is intended for situations where access to standard management tools is unavailable for various reasons. If possible, try to restore standard access to work with fields and sections through the Craft CMS administrative interface.</p>

CC BY-SA 4.0
2024-02-11T13:59:29.087Z
With all due respect, this is terrible advice. Editing the DB tables directly is a great way to end up with a corrupt database. There is a 98% chance that you are just overlooking a Craft setting which would allow you to use the control panel normally.
Lindsey D
CC BY-SA 4.0
2024-02-11T15:02:02.933Z
I agree that's not a good workaround. Maybe there's a cp nav plugin that's just hidding the nav links in the cp? Can you access `www.myite.com/admin/settings` ?
psithu
CC BY-SA 4.0
2024-02-11T17:53:57.377Z
What setting am I missing then? Provide that example quickly so that I can delete my, undoubtedly awful but currently the only possible advice for me, without any doubt)) At /admin/settings/, there is only a cache clearing function, nothing more
Freestyle
CC BY-SA 4.0
2024-02-11T18:04:36.693Z
And by the way, I've already followed my advice and successfully achieved the goal of adding a new field for sections - the main thing is for hands not to grow out of one's rear end."
Freestyle
CC BY-SA 4.0
2024-02-12T12:33:46.473Z
Out of curiosity, what version of Craft is this? I assume Craft 2.x by looking at your general.php.
psithu
CC BY-SA 4.0
2024-02-12T13:45:23.463Z
Nowhere in the website's code could I find the version, but the site was presumably created in 2018."
Freestyle
CC BY-SA 4.0
2024-02-12T13:51:28.563Z
"Is it possible that the developer took everything he needed from Craft and built a stripped-down website on it? In short, he hacked the CMS?
Freestyle
CC BY-SA 4.0
2024-02-15T16:47:49.207Z
Hard to say. I haven't used a Craft 2 project for years and I can't remeber how things looked, but If you go to "mysite.com/admin/utilities/system-report" does that go to "system report" and do you see the edition there? Or maybe at the bottom of the admin panel (though I guess you should've seen that).
psithu
CC BY-SA 4.0
2024-02-17T11:21:59.943Z
"/admin/utilities/ as well as /admin/utilities/system-report/ returns Page not found. The requested page was not found on this server." Also at the bottom of the page in the admin panel, there is no information about the Craft version.
Freestyle
CC BY-SA 4.0
2024-02-11T10:43:33.213Z
2024-02-11T10:46:52.147Z
2024-02-11T10:46:52.147Z
Freestyle
<p>I inherited a Craft website. When I log into the admin panel, I don't see the option in the settings to add sections or add fields or properties within these sections. I can only edit existing ones. In the general.php file, there is no 'allowAdminChanges' setting. I log in as an admin, plugins are disabled. What could be blocking the regular admin view?
Here is general.php</p>
<pre><code>&lt;?php

return array(

    // Default Week Start Day (0 = Sunday, 1 = Monday...)
    'defaultWeekStartDay' =&gt; 1,

    // Enable CSRF Protection (recommended, will be enabled by default in Craft 3)
    'enableCsrfProtection' =&gt; false,

    // Whether &quot;index.php&quot; should be visible in URLs (true, false, &quot;auto&quot;)
    'omitScriptNameInUrls' =&gt; true,

    // Control Panel trigger word
    'cpTrigger' =&gt; 'admin',

    // Dev Mode (see https://craftcms.com/support/dev-mode)
    'devMode' =&gt; false, // TODO: DISABLE IT

    // 'overridePhpSessionLocation' =&gt; true,

    // 'requireMatchingUserAgentForSession' =&gt; false,

    'enableTemplateCaching' =&gt; true,

    'cacheElementQueries' =&gt; true,

    'defaultImageQuality' =&gt; 90,

    'maxUploadFileSize' =&gt; 64000000,

    'imageDriver' =&gt; 'imagick',

    'allowAutoUpdates' =&gt; false

);
</code></pre>

CC BY-SA 4.0
2024-02-12T03:05:11.380Z
i want to make sure something , are you trying to adding new section or field directly from Production Environments?
Nixxian365
CC BY-SA 4.0
2024-02-12T07:45:56.337Z
Yes, I'm trying to do it exactly like that. Is there a problem with doing it that way? I'm a novice in Craft, so please don't kick me for it)
Freestyle
CC BY-SA 4.0
2024-02-13T06:24:56.093Z
no, it's ok. i thought you try to add a new change from local dev. Well, since i haven't try to make a change directly from Production Environment i can't help much. :D
Nixxian365
<admin><settings>
How can I unlock Craft's native functionality?
# How can I unlock Craft's native functionality?

(Asked by: username_0 on 2024-02-10)

I inherited a Craft website. When I log into the admin panel, I don't see the option in the settings to add sections or add fields or properties within these sections. I can only edit existing ones. In the general.php file, there is no 'allowAdminChanges' setting. I log in as an admin, plugins are disabled. What could be blocking the regular admin view?
Here is general.php
 1,

    // Enable CSRF Protection (recommended, will be enabled by default in Craft 3)
    'enableCsrfProtection' => false,

    // Whether "index.php" should be visible in URLs (true, false, "auto")
    'omitScriptNameInUrls' => true,

    // Control Panel trigger word
    'cpTrigger' => 'admin',

    // Dev Mode (see https://craftcms.com/support/dev-mode)
    'devMode' => false, // TODO: DISABLE IT

    // 'overridePhpSessionLocation' => true,

    // 'requireMatchingUserAgentForSession' => false,

    'enableTemplateCaching' => true,

    'cacheElementQueries' => true,

    'defaultImageQuality' => 90,

    'maxUploadFileSize' => 64000000,

    'imageDriver' => 'imagick',

    'allowAutoUpdates' => false

);

**Tags:** admin, settings

> **Comments:**
> **username_1**: i want to make sure something , are you trying to adding new section or field directly from Production Environments?  
> **username_0**: Yes, I'm trying to do it exactly like that. Is there a problem with doing it that way? I'm a novice in Craft, so please don't kick me for it)  
> **username_1**: no, it's ok. i thought you try to add a new change from local dev. Well, since i haven't try to make a change directly from Production Environment i can't help much. :D  

---

## 2 answers

### Answer by username_2 on 2024-02-10. Score: 2

You can also try looking at the `.env` file for the `CRAFT_ALLOW_ADMIN_CHANGES` variable.

> **Comments:**
> **username_0**: there are only mail settings...  
> **username_2**: Can you post your general.php file?  
> **username_0**: did it above   ...  
> **username_2**: I don't remember for sure, but I think `allowAdminChanges` is set to `false` by default on production enviroments. I think in your case you just need to set it t to true in your `general.php`.   I should add though that this is not recommended and that idealy all "admin" changes should be done locally and then deployed to production.  
> **username_0**: It didn't work.  

---

### Answer by username_0 on 2024-02-11. Score: -3

For reasons that I cannot explain, I was unable to gain access to the standard tools for adding fields or sections on my website. Therefore, I found my own workaround. I am sharing this makeshift guide (imperfect, but better than nothing) in case someone else faces a similar situation.

### Instructions for Adding New Fields Directly in the Craft CMS Database

### Instructions for Adding New Fields Directly in the Craft CMS Database

If you do not have access to the standard tools for managing fields and sections in Craft CMS through its administrative interface, this guide will help you add new fields directly through the database. You will need access to your database, which can be obtained, for example, through tools like Adminer or phpMyAdmin. Connection details are usually stored in the dbconn.php file.

#### Steps:

0. Accessing the Database: Use a database management tool, for example, Adminer or phpMyAdmin. The connection details can be found in the dbconn.php file.
1. Adding a Field in craft\_fields: Add a new field by defining its name (name), handle (handle), and type (type). This is a basic step necessary for creating a new field in the system.
2. Adding a Column in craft\_content: For text fields and some other types, adding the corresponding column in the craft\_content table is required, where fieldName is the name of your new field.
3. Setting Up Relations in craft\_fieldlayoutfields: This step ensures the link between your new field and layouts, allowing the field to be displayed in the administrative interface for the respective element types (entries, users, categories, etc.).
4. Modifications in the Site's Output Template: Make the necessary changes to the site's templates to display the new field in the front end.
5. Clearing the Cache: It's crucial to clear your website's cache after making changes directly in the database to ensure that the new additions are reflected on the website. This can often be done within the Craft CMS administrative interface or any caching services your site might be using.

#### Additional Steps:

6. Updating craft\_relations for Linked Fields: If you are adding a field type like "Entries", "Categories", "Tags", "Assets", etc., that creates relationships between elements, the craft\_relations table needs to be updated.
7. Updating craft\_elements and Related Tables: For custom fields associated with specific elements, adding information to the craft\_elements table and corresponding subtables (for example, craft\_entries for entries) is required.
8. Adding a New Field Group in craft\_fieldgroups: If your new field belongs to a new group of fields, add this group in craft\_fieldgroups.

#### Note:

When working with the database, always create backup copies before making changes to avoid data loss or other critical errors. Direct database manipulation can be risky, so approach this process with caution.

This guide is intended for situations where access to standard management tools is unavailable for various reasons. If possible, try to restore standard access to work with fields and sections through the Craft CMS administrative interface.

> **Comments:**
> **username_3**: With all due respect, this is terrible advice. Editing the DB tables directly is a great way to end up with a corrupt database. There is a 98% chance that you are just overlooking a Craft setting which would allow you to use the control panel normally.  
> **username_2**: I agree that's not a good workaround. Maybe there's a cp nav plugin that's just hidding the nav links in the cp? Can you access `www.myite.com/admin/settings` ?  
> **username_0**: What setting am I missing then? Provide that example quickly so that I can delete my, undoubtedly awful but currently the only possible advice for me, without any doubt)) At /admin/settings/, there is only a cache clearing function, nothing more  
> **username_0**: And by the way, I've already followed my advice and successfully achieved the goal of adding a new field for sections - the main thing is for hands not to grow out of one's rear end."  
> **username_2**: Out of curiosity, what version of Craft is this? I assume Craft 2.x by looking at your general.php.  
> **username_0**: Nowhere in the website's code could I find the version, but the site was presumably created in 2018."  
> **username_0**: "Is it possible that the developer took everything he needed from Craft and built a stripped-down website on it? In short, he hacked the CMS?  
> **username_2**: Hard to say. I haven't used a Craft 2 project for years and I can't remeber how things looked, but If you go to "mysite.com/admin/utilities/system-report" does that go to "system report" and do you see the edition there? Or maybe at the bottom of the admin panel (though I guess you should've seen that).  
> **username_0**: "/admin/utilities/ as well as /admin/utilities/system-report/ returns Page not found. The requested page was not found on this server." Also at the bottom of the page in the admin panel, there is no information about the Craft version.  

---

