How to make phpstorm display line numbers by default?
Couldn't find that option. It's kind of annoying to turn them on manually for each page.
-
36you can search on top of the settings pane. just write "line number" and you will find it – kissgyorgy May 02 '12 at 19:03
-
27I can't believe PhpStorm doesn't have this enabled by default. What developer doesn't want line numbers most of the time? (*not really a question*) Anyways, good question, thanks! – Elijah Lynn Jun 05 '13 at 14:47
-
10Yeah, it's actually really annoying that it's not on by default. I'd assume every developer unfamiliar with their product has ended up on this page at some point. – skrilled Nov 18 '13 at 23:21
-
2Maybe we are all supposed to get to the point as programmers where our chi "inner energy" helps us see line numbers even when they're not there. Thank you IntelliJ!!! – Cozzbie Jun 18 '15 at 08:45
-
1Other IDE's don't have it enabled by default either, not sure why... Monitor size is generally not exactly that limited these days, and line numbers are used constantly, by me anyways. – Andrew Oct 11 '15 at 17:36
19 Answers
Settings
(or Preferences
if you are on Mac) | Editor
| General
| Appearance
and check Show line numbers
.

- 2,159
- 1
- 14
- 30

- 389,263
- 172
- 990
- 904
-
34You can get to settings on Windows with `ctrl`+`alt`+`s`, or `file` -> `settings` – Robin Winslow Mar 04 '13 at 11:25
-
12PHP 8.0.3 `Editor` -> `General` -> `Appearance` -> Check `Show line numbers` – ruelluna Feb 23 '15 at 13:59
-
6Ctrl + Shift + A on Windows lets you search all options. Just hit it and type `line numbers` and you can enable and disable them. – Daniel Mar 18 '15 at 16:27
-
-
Just now found where is it on Windows. Its View
-> Active Editor
-> Show Line Numbers
(changes only for current document) and File
-> Settings
-> Editor
-> Appearance
-> Show Line Numbers
(for all documents)
For Mac Version go to PhpStorm
-> Preferences
in menu.
In the preference window go to IDE settings
-> Editor
-> Appearance
-> Show Line Numbers
(To change setting for all documents)
OR if you want to quickly set show line number PER CURRENT WINDOW even easier - right click on the long white column (where breakpoints are set) then select Show Line Numbers.
Red dot on the screenshot is a place where you have to click

- 18,322
- 16
- 103
- 128
-
3For version 8.03 on Windows to change it for all documents, it is now under `File` -> `Settings` -> `Editor` -> `General` -> `Appearance` -> `Show Line Numbers` – John Dorner Mar 26 '15 at 12:23
-
All the guys are right. I am just bringing the the current soultion with the images.
- Go to
File
->Settings
In the box in the top right corner type in
line numbers
, just below that chooseEditor
->Appearance
, from the right checkboxes, findShow line numbers
and check it.After that hit
Apply
andOK
That should do the trick.
My version of PhpStorm is 6.0.3

- 17,604
- 2
- 48
- 43
If you're on a Mac:
PhpStorm -> Preferences... -> Editor -> Appearance -> Show Line Numbers

- 5,891
- 10
- 63
- 97
-
1This is the best answer for MAC! Currently (in PhpStorm 8) I found it in `PhpStorm -> Preferences... -> Editor -> Appearance -> General -> Show Line Numbers` – Pathros Jun 14 '15 at 05:29
In PHPStorm 8 this setting is no longer under 'Appearance' but now in:
File -> Settings -> Editor -> Appearance -> Show line numbers

- 91
- 1
- 3
-
-
You need to open General submenu and then you will find Appearance -> Show line numbers – Filowk Mar 15 '15 at 10:06
Follow the below steps:
- Click on File->Settings->
- In the Settings dialog box Expand Editor under IDE Settings
- Click Apperance - > select Show line numbers.
- Click Apply->Ok.
-
1Your answer is being automatically shown by Google. http://puu.sh/lV9s9/e0be334c42.png – Marco Aurélio Deleu Dec 14 '15 at 12:57
Simplest solution for line numbers in php storm..There are many other solutions but i think A big picture a good from 1000 words.

- 117
- 2
- 9
File -> Settings -> Editor -> General -> Appearance check "Show Line Numbers"
This is the current location as of phpStorm 8.0.2 on Ubuntu 14.04

- 5,959
- 2
- 25
- 24
-
Thanks It worked for me too. The setting is in the right place that has been stated. However I have to restart my PHPstorm to show the line numbers. – Jnanaranjan Feb 18 '15 at 12:41
Settings -> editor | appearance | Show line numbers

- 2,171
- 23
- 29

- 26,790
- 46
- 179
- 291
Just right click on left side where line numbers generally show, select "show line numbers"

- 501
- 2
- 14
-
This solution has already been provided by @pleerock. Please don't post duplicate answers here. – honk Oct 30 '14 at 18:42
In PHPStorm 2016: File > Settings > Editor > General > Appearance > check "Show line numbers"

- 6,481
- 6
- 42
- 50
By typing command + shift + A
you will get a search prompt and write line numbers
. Now you can trigger button on or off

- 3,200
- 3
- 30
- 48
For PhpStorm version 9 on Windows.
File
→Settings
→Editor
→General
→Appearence
then check Show line numbers

- 9,649
- 7
- 44
- 75
in the top right corner is a search button type show line numbers and you will see a toggle option. this way you never have to do it yourself. :)

- 4,082
- 9
- 28
- 46

- 39
- 3
File->settings->IDE Settings->Editor->Appearance
And just check the "Show line numbers" works with 8.0.1

- 404
- 4
- 5
On the Mac version 8.0.1 has this setting here:
PhpStorm > Preferences > Editor (this is in the second section on the left - i.e. IDE Settings NOT Project Settings) > Appearance > Show line numbers

- 80,579
- 89
- 266
- 376
You should go to: File -> Settings -> Editor -> General -> Appearance -> Show Line Numbers

- 654
- 1
- 10
- 21
As of the latest version:
PhpStorm > Preferences.. > Editor > General > Appearance > Show line numbers

- 9,564
- 146
- 81
- 122

- 1
- 2