TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: WordPress vs. Django/Flask?

25 pointsby spacetimeuser5over 1 year ago
I may get to work for a small translation agency to build a website for them plus a bit of marketing stuff, and maybe a remote desktop and a platform for invoicing for their personnel. I am self-teaching myself web-design and the related stuff (Python mainly for everything, but HTML&#x2F;CSS, C++, SQL and databases also) and a few years ago I also administered a Wordpress site for a while, so am a bit familiar with themes&#x2F;addons etc.<p>But for a few recent months it seems I&#x27;ve seen some news on HN as about once per month that someone&#x27;s Wordpress site was hacked.<p>Which web framework may be better for a small agency (or in a general business case): Wordpress or Django&#x2F;Flask?<p>Can you describe a typical workflow and which other tools&#x2F;frameworks&#x2F;keywords&#x2F;etc (like REST) I need to use for this?<p>As I am a bit nervous that I am self-taught in this field, though have tons of materials on that, but this job may provide some resources for my main projects.

24 comments

codegeekover 1 year ago
WordPress is totally fine and used by many agencies in the real world. It gets a bad rep because it is extremely popular and has low barrier to entry which also attracts more eyeballs and script kiddies trying to break in due to vulnerability in some low quality plugins.<p>But you need to choose based on what your objectives are. WP is quick and give you decent bang for buck especially if you don&#x27;t need to create something from scratch and needs to be used by non developers. It is not really comparable to Django&#x2F;Flask which are actual frameworks to build web applications. WordPress is more of a Content Management System (CMS) that has been extended over the years to technically create flexible Applications but mostly for non tech users.<p>Use WordPRess if you want to build websites with some dynamic functionality like contact forms etc (plenty of well vetted plugins for those). Use Django&#x2F;Flask if you are building a full web application with tons of user interactions.<p>WordPress = Web Site<p>Django&#x2F;Flask = Web App
评论 #37543086 未加载
评论 #37537859 未加载
chadpaulsonover 1 year ago
Django has a CMS called Wagtail, which has some really nice features including custom content blocks which allow you to easily create unique looking pages.<p>Wagtail has over 15,000 stars on GitHub, is heavily supported and was created in 2014. It has since been adopted by organizations such as NASA, Google, and the National Health Service.<p>Below is a comparison between Wagtail and Wordpress.<p><a href="https:&#x2F;&#x2F;wagtail.org&#x2F;wagtail-vs-wordpress&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;wagtail.org&#x2F;wagtail-vs-wordpress&#x2F;</a>
评论 #37537862 未加载
评论 #37538111 未加载
rossdavidhover 1 year ago
1) If you just need a website, not any custom functionality but just the basics (i.e. a glorified blog), then Wordpress is fine. Pick a good WP hosting company and they will take care of a lot of the security stuff. WP is secure if kept up to date, and you&#x27;re not using third-party plugins.<p>2) If you need what is called a CRUD (Create-Read-Update-Delete) website, doing something more like a spreadsheet, but with more complexity than a spreadsheet can handle, then Django makes this as easy as it is possible to be. However, you will have to do a lot more programming than with WP, where really you shouldn&#x27;t have to do much programming at all.<p>3) If you need even more customized functionality than CRUD, then Flask is easier to customize. For example, you need to make a real-time auction site, or connect to a machine learning library to train up new models every week, or some other really non-standard thing. There, Django&#x27;s features that make CRUD easier, will just get in your way. Flask is more lightweight, meaning it provides less but is also much more flexible to do non-CRUD websites.<p>If you are doing what a typical small company needs, then you should go with Wordpress. It can do everything you need, there is an abundant ecosystem of companies to host and maintain it for you, and all of the extra power that Django or Flask would give you, are not going to be utilized. Wordpress is fine security-wise, if you keep it up to date.
评论 #37539447 未加载
jstarfishover 1 year ago
Your business requirements:<p>&gt; build a website for them plus a bit of marketing stuff, and maybe a remote desktop and a platform for invoicing for their personnel.<p>This is a shoe-in for Django, especially the invoicing part.<p>Wordpress is a blog engine. It&#x27;s great for letting a bunch of people log in and submit news but every feature you implement beyond that is going to be through plugins, and those are routinely compromised. All sites I&#x27;ve deployed that used only the major plugins (Yoast, Jetpack, WooCommerce, etc.) are still running. All third-party ones have since been compromised, which is embarrassing for me. I wouldn&#x27;t deploy Wordpress for a business again unless the alternative was Magento.<p>Django isn&#x27;t bulletproof, but it will stop you from making amateur mistakes as you build it out. There is no convenient plugin architecture with a friendly UI, which makes it harder for yourself (and the client) to change themes&#x2F;plugins every week and introduce code that can be exploited.
redder23over 1 year ago
&quot;I am self-teaching myself web-design and the related stuff (Python mainly for everything, but HTML&#x2F;CSS, C++, SQL and databases also) and a few years ago I also administered a Wordpress site for a while, so am a bit familiar with themes&#x2F;addons etc.&quot;<p>Sounds like you trying to learn to many things at once. And you for sure do not need to learn C++ for web development. PHP is and JS&#x2F;TS is missing from your list. That would be the languages to learn for WordPress. But there there are already plugins for invoicing and things you need out there, sounds like there is nothing too obscure that can not be solved with already existing plugins. So do you really need to be a programmer? Probably not.<p>There is a reason WordPress is used to much, I am biased because I am a self taught WP dev but WP and PHP and evolving constantly, there is a plugin for everything ...<p>You supposed to build a website, remote desktop, invoicing for an agency and their hired you for what exactly? What skills did you tell them you have?<p>Sorry but you sound very naive and I could not find what your actually skilled in. You look for &quot;keywords&quot;??? And you read one article about someone WP site getting hacked that makes you think WP is insecure?<p>Even if I try to be unbiased this sounds like a clear case for WordPress to me.
评论 #37544981 未加载
nickservover 1 year ago
Flask (or fastAPI more recently) will give you a basic webserver... and that&#x27;s about it. You&#x27;ll have to do everything yourself basically. I would not go this route, unless you have no deadlines and want to learn a lot on the way.<p>WP will be easy to set up, but adding custom functionality can be a real pain, and lots of plugins are of ... questionable quality, especially regarding security. I personally strongly dislike WP, but it does the job so long as you keep things simple and lock down your plugins.<p>Django will give you a good structure and some core functionality like login out of the box, and the built-in admin site is great, but you&#x27;ll need to code your functionality. It looks like you&#x27;re doing some custom code so this approach could work. You could also use something like django-cms or wagtail if want some of the WP functionality.<p><a href="https:&#x2F;&#x2F;www.django-cms.org&#x2F;en&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.django-cms.org&#x2F;en&#x2F;</a><p><a href="https:&#x2F;&#x2F;wagtail.org&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;wagtail.org&#x2F;</a>
nhgiangover 1 year ago
Wordpress: Least learning curve, hard to customise down the line.<p>Flask: Deceivingly simple at first, but you&#x27;ll spend full-time debugging it soon. It is NOT a framework for beginner.<p>Django: A bit more learning curve than WP, but will take you far, if you read its docs properly.
评论 #37537762 未加载
maremmanoover 1 year ago
Hey there!<p>Using Django or Flask might be overkill for what you&#x27;re trying to do. I suggest you to stick with WordPress, but check out the Sage&#x2F;root style over at <a href="https:&#x2F;&#x2F;roots.io&#x2F;sage" rel="nofollow noreferrer">https:&#x2F;&#x2F;roots.io&#x2F;sage</a>.<p>It&#x27;s not the classic WordPress; it&#x27;s a modern, more secure version (not more secure but less prone to some common automatic attacks).<p>Also only use plugins when you absolutely have to, and if you do, stick with the pros (i.e. Gravityforms).<p>I&#x27;ve used WP alot (more than 1000s of websites) and I&#x27;m also using Python with Flask and FastAPI (but never used Django).
simneover 1 year ago
They are totally different axis.<p>WP is mostly small business workhorse, nearly all included in package (admin, editor, lot of third party addons), which is good enough for small scale, cheap and simple (most things could be done without developers), but not scales well.<p>So if business grow, at some moment it will be very hard to use WP, and&#x2F;or business will be slow down if continue use WP.<p>Django is better when have developers team, it is full featured framework, have many things included into one officially supported package (but not as complete as WP), optimal for medium business, and with good developer&#x2F;ops, could serve any scale, but it have too steep learning curve for start small.<p>Flask, could be considered as simplified Django, also good, but to make same things as Django, you need to create modular design from many separate packages, which are not orchestrated&#x2F;supported by one official source.<p>So with Flask you probably will start faster than with Django, (I myself spent ~half of year to learn Django, with Flask I started in weekend), but you may encounter problems, when some dependency will be changed too much, so you will need to recreate interface for it.<p>Unfortunately, Django does not offer standard way to transit between major releases, but within one major release you could expect minimal efforts to transit, if use standard components. Many things, possible to recreate on other version, just by change config and&#x2F;or database scheme, so many works could be done by ops (Admin&#x2F;Database administrator).<p>WP also does not offer standard transition way, but in many cases it is just very simple to recreate all from scratch, many works could be done by just user and some things need ops.<p>With Flask, when you need to transit to other version, you probably, will recreate all interfaces between components, need programmer to do this, also ops.
评论 #37577600 未加载
bell-cotover 1 year ago
Go with the one you know. &quot;WP got hacked&quot; is (~99% of the time, when on a competently-run web host) a case of (1) Webmaster used an iffy WP Plugin* or few (the plugin was obscure&#x2F;orphaned, and not getting timely security updates), (2) Webmaster didn&#x27;t bother installing Plugin security updates, (3) Webmaster disabled WordPress&#x27; own automatic security updates, or (4) Webmaster wasn&#x27;t smart about his admin password.<p>*or Theme, or other 3rd-party code
评论 #37537807 未加载
qupover 1 year ago
If you don&#x27;t have a developer, you need WordPress or an alternative.<p>The description isn&#x27;t enough to know if it&#x27;s something wordpress could handle out of the box.<p>There are places that host and manage WordPress. If you don&#x27;t install any plugins, WP is secure enough.<p>The difference in a Django hello world and a fresh WordPress install is like a million lines of code.
评论 #37537612 未加载
foco_tubiover 1 year ago
Use Wordpress (or Wagtail) as a headless CMS to let your client add and edit content, and hit the endpoints to hydrate your templates in your front-end framework of choice.<p>My workplace has multiple WP sites and Shopify stores, and I&#x27;m thinking of trying to consolidate all of these under a single presentation layer, probably with Gatsby.
snowwrestlerover 1 year ago
I think you are smart to be nervous. There is risk when you don&#x27;t know very much but are getting paid by a company to do technical things to enable their business.<p>Consider what is commercially available. Selecting, configuring, integrating, and supporting software services is still something you can charge for. Small companies pay for efficient results, they don&#x27;t typically care how much code you personally write.<p>You could build their marketing site on a fully hosted solution like Squarespace, Wix, Weblow, etc. Or if you want to use Wordpress, stick to something like Wordpress.com or WP Engine with a commercial template and all auto-updating turned on. Make it easy on yourself and outsource security to folks who know what they are doing.<p>Remote desktop and invoicing also sound like needs that can be met more efficiently and securely by available commercial solutions.
ahmedfromtunisover 1 year ago
As a Django fanboy, I recommend you choose WordPress everytime.<p>It takes care of 99% of the things a marketing website needs to have. For the 0.999% other stuff it doesn&#x27;t include, the plugins can take care of it.<p>&quot;But what I&#x27;m building falls under those 0.0001% cases not covered :&#x2F;&quot;<p>Oh, then use Django.
nocommandlineover 1 year ago
1) Lots of Wordpress (WP) sites. This makes it quite easy to find devs (to maintain the website in the future). There are also lots of plugins making it easy to add functionality&#x2F;features.<p>But easy availability of plugins leads to high probability of hacking. Put another way, a WP site needs constant monitoring&#x2F;upgrades of the plugins to avoid being hacked. This means $$ out of pocket for website owners but money for developers.<p>2) Personally, I don’t recommend WP. I prefer Python&#x2F;Flask (I’m more familiar with it) or Django. You can build the site and essentially forget about it.<p>In addition, I prefer separating front end code from back end code (for WP, you use PHP which combines both html and server side code in same file)
评论 #37537990 未加载
etchalonover 1 year ago
WordPress for any content-focused site - especially where non-technical users will need the ability to modify content.<p>Django for any functionality-focused site or web application.<p>Flask for quick APIs of limited functionality that just need to &quot;get done now&quot;.
Saphyelover 1 year ago
I&#x27;d recommend for your use case Wordpress (or static site generator like MkDocs).<p>You can use the one hosted in wordpress and change the domain, so you don&#x27;t have to worry about hackers or anything. This one is a plug a play, so unless you want to do a custom template&#x2F;plugin you don&#x27;t need to learn to code.<p>* Django is like a wordpress but less popular and less SEO friendly (or less popular for them).<p>* Flask will require you to learn a lot of html, python, etc.. it will consume you a lot of time to get to the same point to the other 2. Flask can get better results than the previous two but for your use case I don&#x27;t think it really matters.
chadpaulsonover 1 year ago
You had also mentioned you were looking to create a platform for invoicing. There are several Django apps that offer invoicing functionality. I do not have experience with any of them, but below is a good feature matrix which should allow you to drive decisions as you prototype and test them out.<p><a href="https:&#x2F;&#x2F;djangopackages.org&#x2F;grids&#x2F;g&#x2F;invoicing&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;djangopackages.org&#x2F;grids&#x2F;g&#x2F;invoicing&#x2F;</a>
bombcarover 1 year ago
Wordpress with as few plugins as you can manage; and then only use super popular plugins.<p>Minimize customization, and keep it updated.<p>Then someone else can always work on it.
nologic01over 1 year ago
Wordpress is the perennial hacking target because of its popularity.<p>The core is fine but the attraction of WP is not so much the core but the huge number plugins and many plugins are <i>not</i> fine (but they dont say so on the label).<p>You cannot go wrong with Wagtail, but its learning curve is steeper. It doesnt come much out of the box.
ChrisArchitectover 1 year ago
Where are all these HN posts you&#x27;re talking about Wordpress installs being hacked? Not saying it doesn&#x27;t have some risks &#x2F; for a very long time, but there aren&#x27;t posts on here about it regularly.
评论 #37544836 未加载
amtsover 1 year ago
Or here&#x27;s a follow-up question: can Django&#x2F;Flask provide the same functionality&#x2F;user experience as Wordpress?
评论 #37537928 未加载
notpushkinover 1 year ago
Given you&#x27;re willing to learn some code, I&#x27;d go with Flask — it&#x27;s fairly easy to get started with IMO. It might be a better fit for more complex apps, but should be fine for marketing stuff as well. You do have to implement pretty much everything from scratch though (or, more realistically, use plugins).
PrimeMcFlyover 1 year ago
WordPress is incredibly bloated and has a terrible security history, mainly due to insecure plugins but not only.<p>I can&#x27;t imagine ever choosing it over Django with Wagtail. It&#x27;s a little bit more work to implement and maybe maintain, but the payoffs are well worth the investment.
评论 #37538882 未加载
评论 #37538651 未加载