<p>The <code>title</code> column in the <code>craft_content</code> database table has the column type <code>VARCHAR</code>, which is limited to 255 characters. There's no setting that'll change the column type for you – you can always use a tool like phpMyAdmin or Sequel Prop to change it to <code>TEXT</code> in order to increase the limit and it'll probably work, though it seems like a bit of a risk.</p>

<p>Edit: Brought to my attention by the OP in the comments below that both the actual input field and possibly some validation functionality is also limiting the <code>title</code> field to 255 characters. My revised TLDR answer: Nope, don't bother trying :)</p>

<p>In my opinion, the following would probably be a safer/better way to solve your issue:</p>

<ol>
<li>Add a PlainText field to your Entry Type (give the handle <code>text</code> or the like). Consider making it multiline, since there's a fair amount of text for each entry.</li>
<li>Pop into the Entry Type's settings (under CP -> Settings -> Sections -> [entry type], and uncheck the <code>Show the Title field</code> checkbox.</li>
<li>In the <code>Title Format</code> field that appears, add something like this:</li>
</ol>

<p><code>{{ object.text | length &gt; 252 ? object.text | slice(0, 252) ~ '...' : object.text }}</code></p>

<p>With the above in place, your content editor(s) will still only have to edit a single field (it'll just be called <em>Text</em> instead of <em>Title</em>), and the contents of the "Text" PlainText field will be copied over to the actual <em>Title</em> field when the entry is saved. For the few entries that have more than 255 characters, the title will be truncated to the first 252 characters, suffixed w/ <code>...</code> – those 252 characters <em>should</em> probably be enough to identify each entry inside the CP (you might want to add <a href="https://craftcms.com/support/enabling-fuzzy-search-by-default" rel="nofollow noreferrer">fuzzy searching</a>, btw), and the dots look nicer than just cutting the text off. The <code>text</code> field will contain the full, un-truncated text.</p>

<p>Obviously, in your templates you'll need to use <code>{{ entry.text }}</code> instead of <code>{{ entry.title }}</code> to get the full text.</p>

CC BY-SA 3.0
2017-11-09T19:37:59.207Z
Thanks. I did find it in the database. However there's also a _titlefield template that limits the input to a maxlength of 255 and appears to be a validation rule that also limits it to 255 characters on submit. So I will try your solution. I agree, 252 characters should be enough to identify most of them, since I was already about 50 goals in before I ran into the problem. Thanks!
Tiffany Ring
CC BY-SA 3.0
2017-11-09T19:41:06.470Z
Aha. Didn't think about that; but it kind of drives home the fact that you don't really want to mess around w/ the Craft internals; especially not when there's functionality in there to essentially use _any_ custom field as a title (the `Title Format` field eats Twig for lunch), and yeah – 255 (or 252) should be enough to identify specific posts, probably :)
Mats Mikkel Rummelhoff
CC BY-SA 3.0
2017-11-09T19:53:37.327Z
You seem to be  saying that the maximum length of any VARCHAR column is 255 characters.  It may be that the current length is set to that but don't believe that's the technical limit.
AllInOne
CC BY-SA 3.0
2017-11-09T20:19:30.280Z
@AllInOne you're right, sort of -> https://stackoverflow.com/a/13506920/4663184.
Mats Mikkel Rummelhoff
CC BY-SA 3.0
2017-11-09T18:19:02.773Z
2017-11-09T19:42:54.390Z
2017-11-09T19:42:54.390Z
Mats Mikkel Rummelhoff
<p>Simple use case: I have a channel that is setup solely to be used in an entries field to relate goals that are used on multiple pages. The goals channel simply has the title field, as the goals themselves are all one sentence statement and need to be easily identifiable by content editors for the site. Unfortunately, one of them is 268 characters, and the Title field has a limit of 255 characters.</p>

<p>So my question is - is there a recommended way to change the character limit for the title field? If it's in the database structure, where is it? (I will continue to dig through the database for this). If it's in config, is there a configuration override to do this so it doesn't get changed back every update, or a plugin? </p>

<p>Thanks!</p>

<titles>
Is it possible to increase the Title character limit?
# Is it possible to increase the Title character limit?

(Asked by: username_0 on 2017-11-09)

Simple use case: I have a channel that is setup solely to be used in an entries field to relate goals that are used on multiple pages. The goals channel simply has the title field, as the goals themselves are all one sentence statement and need to be easily identifiable by content editors for the site. Unfortunately, one of them is 268 characters, and the Title field has a limit of 255 characters.

So my question is - is there a recommended way to change the character limit for the title field? If it's in the database structure, where is it? (I will continue to dig through the database for this). If it's in config, is there a configuration override to do this so it doesn't get changed back every update, or a plugin?

Thanks!

**Tags:** titles

---

## 1 answers

### Answer by username_1 on 2017-11-09. Score: 3 | Accepted answer

The `title` column in the `craft_content` database table has the column type `VARCHAR`, which is limited to 255 characters. There's no setting that'll change the column type for you – you can always use a tool like phpMyAdmin or Sequel Prop to change it to `TEXT` in order to increase the limit and it'll probably work, though it seems like a bit of a risk.

Edit: Brought to my attention by the OP in the comments below that both the actual input field and possibly some validation functionality is also limiting the `title` field to 255 characters. My revised TLDR answer: Nope, don't bother trying :)

In my opinion, the following would probably be a safer/better way to solve your issue:

1. Add a PlainText field to your Entry Type (give the handle `text` or the like). Consider making it multiline, since there's a fair amount of text for each entry.
2. Pop into the Entry Type's settings (under CP -> Settings -> Sections -> [entry type], and uncheck the `Show the Title field` checkbox.
3. In the `Title Format` field that appears, add something like this:

`{{ object.text | length > 252 ? object.text | slice(0, 252) ~ '...' : object.text }}`

With the above in place, your content editor(s) will still only have to edit a single field (it'll just be called *Text* instead of *Title*), and the contents of the "Text" PlainText field will be copied over to the actual *Title* field when the entry is saved. For the few entries that have more than 255 characters, the title will be truncated to the first 252 characters, suffixed w/ `...` – those 252 characters *should* probably be enough to identify each entry inside the CP (you might want to add [fuzzy searching](https://craftcms.com/support/enabling-fuzzy-search-by-default), btw), and the dots look nicer than just cutting the text off. The `text` field will contain the full, un-truncated text.

Obviously, in your templates you'll need to use `{{ entry.text }}` instead of `{{ entry.title }}` to get the full text.

> **Comments:**
> **username_0**: Thanks. I did find it in the database. However there's also a _titlefield template that limits the input to a maxlength of 255 and appears to be a validation rule that also limits it to 255 characters on submit. So I will try your solution. I agree, 252 characters should be enough to identify most of them, since I was already about 50 goals in before I ran into the problem. Thanks!  
> **username_1**: Aha. Didn't think about that; but it kind of drives home the fact that you don't really want to mess around w/ the Craft internals; especially not when there's functionality in there to essentially use _any_ custom field as a title (the `Title Format` field eats Twig for lunch), and yeah – 255 (or 252) should be enough to identify specific posts, probably :)  
> **username_2**: You seem to be  saying that the maximum length of any VARCHAR column is 255 characters.  It may be that the current length is set to that but don't believe that's the technical limit.  
> **username_1**: @AllInOne you're right, sort of -> https://stackoverflow.com/a/13506920/4663184.  

---

