The answer may depend on a few things; your employment circumstances, and whether the PhD while working program even allows it.
Many traditional PhD programs do not allow students to work while getting their PhD education. Unless of course the program is an Executive PhD or Doctorate in Business Administration (DBA) program (I discuss executive PhDs in another post).
I had this question when I was thinking of going back to school for a PhD. I was working fulltime at a client-facing job and thought I would be able to handle both jobs. After all, I had juggled many aspects of life in the past and this should be no different; I thought to myself.
I called and spoke to the PhD Advisors many schools. All but one of them said, no outright. Their PhD programs are fulltime programs. It is so to ensure the success of the students. The PhD education is rigorous just on its own.
About PhD while Working:
Doing it while working might add another level of challenge that makes it harder for the student to succeed and complete the program. One of the programs said no, but. The but… was along the lines that their program was a fulltime and required fulltime effort and dedication, but that one might choose not to disclose that they worked.
I did end up going to one of the outright no schools. A PhD program is rigorous. Working while doing a PhD can be a hard thing to do. I contemplated it. I didn’t do it, and I am glad for it.
Depending on what one wants out of both the PhD program and their other work, it could be a constant juggle, trying to serve and satisfy two competing interests. Doing so may affect the quality of one’s research, and at the same time, their work.
Both might suffer. If one is interested in remaining in academia after their PhD education, then doing quality research and having publications while still in school are both important. A research publication demonstrates competence and lets a potential employer (University) know that one is capable to executing research.
There are esteemed PhD programs that are designed just for working professionals. These are the Executive PhD and Doctorate in Business Administration programs. The programs are not full-time. However, the caveat is that it is self-funded by the student.
Which path would you choose?