• Now I know this may have been discussed before, but considering I couldn’t find anything on the topic, I thought I should bring it up just in case, to create healthy debate on the topic.

    WordPress for a long time has relied on PHP as its only platform, which has been fine since PHP is nearly universally adopted by all hosts big and small. However, PHP has been declining in usage. According to github’s octoverse, it went from 4th most used programming language to 7nth in just 3 years, with tendency to continue going down.

    On the opposite hand, javascript and its twin typescript have been on the rise since 2009 thanks to Node.js. Many hosts nowadays offer node.js as an option to create projects, and it tends to be even cheaper than normal php hosting.

    So my idea here is to create a side version of wordpress, like tensorflow did with tensorflow.js. Something that internally works exactly the same, and can be connected to the same kinds of databases and whatnot, but use separate plugins and themes(ones made for node.js) in a separate repository. This way, wordpress as a project would be better future proofed and, considering that node.js is faster and provides things that PHP doesn’t such as asynchronous programming, could also allow for better performance(which would be a massive plus, incentivizing early adoption and getting the project a jumpstart). Not to mention that javascript in general has far better backwards compatibility than PHP, which means easier backend updates to newer versions of node.js.

    I myself have a wordpress website running in PHP 8.1(cant run php 8.2 without daily crashes/other problems due to incompatibility) and would happily migrate over given the change.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @peq42,
    Thank you for bringing up this interesting topic for discussion. Your idea of creating a Node.js version of WordPress to complement the existing PHP-based one is certainly thought-provoking. Let’s break down some of the key points you’ve raised:

    1. Declining Usage of PHP: You’re right that PHP’s popularity has seen a decline in recent years. However, it’s essential to note that PHP still powers a significant portion of the web, and many websites continue to rely on it. This includes WordPress, which is built on PHP. While it’s important to stay aware of technological trends, it’s also crucial to consider the vast existing WordPress ecosystem that relies on PHP.
    2. Rise of JavaScript and Node.js: JavaScript, along with Node.js, has gained immense popularity and has a vibrant developer community. The asynchronous nature of Node.js, which allows for non-blocking I/O operations, does make it an appealing choice for certain applications.
    3. Compatibility and Performance: Node.js does offer some advantages in terms of performance and asynchronous programming, which could lead to potential benefits for a WordPress-like platform. However, it’s worth considering that PHP has made significant improvements in recent versions, including PHP 8.0 and 8.1, to enhance performance and modernize the language.
    4. Backwards Compatibility: JavaScript indeed has strong backward compatibility, which can be advantageous for long-term sustainability. However, it’s essential to recognize that WordPress, being a mature platform, faces challenges in maintaining backward compatibility due to the vast number of plugins and themes available.
    5. Migration and Adoption: Migration from one technology stack to another is a complex process, especially for a platform as large and diverse as WordPress. Ensuring a smooth transition for users and developers would be a significant undertaking.

    In summary, your idea has merit, particularly in terms of exploring new technologies and improving performance. However, any major shift like this would require careful planning, significant development effort, and a robust migration strategy to ensure a seamless transition for existing WordPress users and developers.

    It’s also worth mentioning that the WordPress ecosystem is adaptable and often incorporates new technologies through plugins and themes. Many developers have already integrated JavaScript and Node.js into their WordPress projects. While creating a separate Node.js-based WordPress version is a substantial endeavor, it’s worth exploring how existing WordPress can continue to evolve to embrace these technologies while maintaining backward compatibility.

    Overall, your proposal sparks a valuable conversation about the future of WordPress and its technology stack, and it’s important to consider the implications and challenges from various angles before embarking on such a significant change.

    Let me create a ticket on core trec to make this topic more accessible to the WordPress contributors and core team to share their ideas. you can track the topic on below url.
    https://core.trac.wordpress.org/ticket/59335

    Thanks!

    Hi!

    I’ll try to give my understanding about WP.

    (First of all, I love WP so my DEV side really want to see something like this. Imagine WP paradigm into JS like AdonisJS for Laravel.)

    Everything (a good portion at least) in WordPress is about “provide a platform so that even a non-techie can build a website easily without the need of understanding programming languages” and about empowering non-developers.

    Said that, we should see the most used web server language. According to Host Advice PHP is the leader by far:

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WordPress for Node.js’ is closed to new replies.