Grafting the changes you're requesting, i.e., changing the sorting orders for authors and editors, onto an existing copy of
apalike.bst is likely going to be tricky, to put it politely.
I'd therefore like to suggest that you run the
makebst utility. The file
makebst.tex should be included in all modern TeX distributions; run the utility by typing
latex makebst at a command line prompt. This interactive utility program will provide a detailed set of questions and various possible answer options for each question. Choose the options you need. In most (but not all) cases, the default option (indicated by an asterisk) will be what you want anyway.
Among the more important questions for which you wouldn't want the default option are:
Q.3, "Name of the final OUTPUT .bst file?" (choose a filename that appeals to you);
Q.9, "STYLE OF CITATIONS" (be sure to choose option "a", for author-year style citations); and
Q.17 (or so), "AUTHOR NAMES" (choose option "a").
At the very end, the utility will ask you
Shall I now run this batch job?
Answer "yes" and a custom
.bst file (with the filename you chose at the prompt following Question 3) will be created.
As a side-benefit of creating your own custom bst file using the
makebst method, you'll get a bibliography style that "knows" what to do with fields such as
issn. The original
apalike style is more than twenty years old; a the time, fields such as
doi simply weren't meaningful...
Once you have the custom
.bst file, it shouldn't be too difficult for you to replicate any earlier changes you may have applied to your copy of