Newbie question

Please forgive me if this is obvious or has been asked before, but is there a file to rename a file without changing references to it in other files? I have some older, outdated files that I have essentially replaced and so I want to rename the old files and then rename the newer one to the old name so that the menu that uses the filenames stays in tact.  But when I tried to rename the file, say from "file.php" to "file_old.php"  the menu file was automatically updated to "file_old.php" so now I have to manually go in and edit it back to "file.php"?

I'm not sure if that makes sense.  I'm probably doing something wrong :)  I'm just on my second day with a trial of PHPStorm and I like a lot of things about it but still new to IDE environment versus text editor. 


Hi there,

When you do "Refactor | Rename" on file (e.g. in Project View panel) it has special option -- try unchecking it.

As reminder: this action is context dependant (does different thing based on where it is invoked) so it must be invoked on a file -- because when invoked inside the file it will offer to rename class/namespace or variable (whatever is under caret).


Ah!  I saw that checkbox just after posting this question and wondered if that might be the trick!  Thanks, I will try that next time!


Please sign in to leave a comment.