It depends on your preference...
I have been focusing on JavaScript for the past 2 years, and I'm totally satisfied with my decision to switch from PHP/WordPress to JavaScript/React.Js/Next.Js.
Don't get me wrong!
I really love PHP and WordPress... I built many awesome projects with these technologies. Still, before I switched, I was constantly worrying about PHP losing ground as a preferred backend choice.
This programming language is strongly specialized for server-side scripting.
And it constantly gets improved...
The thing is, many other languages like (Node.js/Python/Golang) have entered the competition in that area and are stealing market share. If you check PHP in Google Trends, you will notice it's losing popularity.
On the other hand, some people say WordPress powers nearly 40% of all websites. So there are many opportunities here: from making and optimizing websites to distributing themes and plugins.
You will never be hungry if you become a decent WordPress developer.
Moreover, as more and more people hop on the JavaScript and Python "bandwagons," there will be increased demand for PHP developers, and the salaries will start growing.
But bear in mind that not many cool projects use those technologies. You will handle a lot of legacy code, and the "wp style" of coding is uber quirky. It still needs to catch up with the PHP Standard Recommendations (PSR), any proper OOP concepts, etc.
So if you want to write modern, clean code for a rising startup... using a programming language on the crest of the wave...
Then WordPress shouldn't be your primary focus.
You should focus on JavaScript…
Top comments (9)
"SEO Guy"
Interesting. I love optimisation - my name might indicate that.
I love wordpress. It has been a static site generator with a strong client backend for a very long time when used right. Used right it can be faux reactive with anchor points (old tricks die hard).
A lot of plugins are just nice UIs for very simple tasks. PHP trends are very tightly linked to wordpress - react is definitely eating into wordpress's market share. At the the same time as people are realising that wordpress is losing its competitive edge as new CMS' challenge it and it has become a bit of a moneygrab.
I have had new devs tell me it is insecure because it is open source while working on React on a public git repository, the clear lack of knowledge is shocking.
The problem is new react devs leak memory all over the place, they are often highly opinionated on their stack - because one that is one of react's pros. I recently made a very image heavy site get all 100s on lighthouse, interactive in 90ms on wordpress, goodluck finding the admin page. It is very secure and not hosted publically on github.
JSX is ok. I like solidjs. To me good react devs don't exist. Next is great, Preact is great, solid is great, they all work together. I am not a fan of virtual dom. Astro fixes a problem with its dynamic island architecture.
Modularity was seen as great, but new apps have monolithic components. If a component is the size of most webpages of course modularity and codesplitting is important, that has become the new norm and wordpress is following suit with their blocks but I actually think that is a better solution for everybody.
I think it can be framed as if you are looking two get a career react is the way, as a freelance focus on wordpress.
/rant
Thanks for this comment!
WordPress definitely has a lot of pros. I still use it, but it's not my focus.
Or both at the same time...
Why are you comparing a language to a Content Management System ? This is total non-sense.
Nope. It's not total nonsense. Those are two separate career paths - a WordPress Developer and JavaScript Developer.
You still need to know some JavaScript if you're a WordPress developer, but not how you should know it if you are a front-end js dev or a full-stack js dev.
Agreed - js Devs currently get paid better overall I think - as I said in my long comment React is in high demand, as is Angular. Good programmers should get the gist of a language if they have a ref for the syntax. Wordpress Devs are different to the techy kid who build a wordpress page in Elementor. They are both careers - one requires knowlege of PHP and composer as well as JS and CSS and modernly. They share JSON and often need to work on API routes, SEO or security.
That's like saying people don't hire JS devs they only hire junior programmers.
I maintain my POV. You're both talking about career or pay... But still comparing a programming language with a CMS (which is like a software!). Your comparison is simply not relevant.
Compare JS & PHP, ok in a certain scope and only if you're talking about backend development. And then focus more on comparing NodeJS vs PHP.
Whuuut!? Comparing a runtime built with a programming language? :)
I'm joking, of course... just to point out you're "guilty of the same fallacy."
Ok if you'd like to get the last word. Fallacy then.