3

I've been running a niche job-search web-site for the past several years. I wrote it from scratch in PHP. Essentially it allows members to search for or post job ads. As you can imagine it has search forms, search results and member profiles and all the jazz that goes with that.

It's come to look horribly dated and, seeing all those nice Wordpress templates around, I thought that perhaps there was a way to migrate it to Wordpress.

Is this practical? Would I somehow embed my PHP code inside Wordpress pages?

EDIT: Thank you to everyone for taking the time to help. All of your comments have been really helpful!

  • If you're just looking for a new design—and your app is working the way you want it to—it's probably easier to update your HTML/CSS than it would be to port it all to WP. If there's a particular WP template you like, there's nothing stopping you from downloading (or buying) it and then using the HTML/CSS on your own project. – Will Dec 8 '15 at 3:18
  • Depends on your WordPress knowledge. I am not sure if you can "embed" php codes. WP written in PHP but how it handles database and templates is different. You may need to rewrite the whole functionality into WP. – Sisir Dec 8 '15 at 5:06
  • wpgear.org - an interesting list of WP tools worth a look – jgraup Jan 5 '16 at 20:28
  • generatewp.com - a UI to help transition your code with less errors – jgraup Jan 5 '16 at 20:30
1

In my opinion as long as your needs are exclusively about looks it's never a good reason to migrate to entirely different code base. The separation of backend code and frontend site is inherently one of the strengths in web development.

When you you are a lone developer on own project there are roughly three design options:

  1. Custom tailored commercial design [which you typically won't have spare mountain of cash for :)].
  2. Off the shelf commercial/free design, specific to framework used or provided as generic to be sliced.
  3. DIY design, preferably starting with off the shelf foundation and customizing to your specifics.

You seem to be interested in framework case of option 2, but resource investment you are considering (switching/integrating with WordPress) will be very considerable.

If you operate with money that cost might be better spent on just getting great custom design.

If you operate with time you might focus it on DIY design update. It won't win design awards, but it will be perfectly usable.

In either case you would have a benefit of individual solution, better fitting your functionality.

| improve this answer | |
  • Thanks very much for this information. It lays out my options clearly and logically. – HansA Dec 8 '15 at 11:05
3

Is is practical? Sure, if you like to learn new frameworks. Just spin up a Cloud9 or Pantheon account to test it out. It's PHP so just find a place where you're code fits in.

You'll just have to get used to the way WordPress's Template Hierarchy works and how it queries posts.

WordPress 4.4 drops tomorrow with some pretty interesting features out of the box including core support for responsive images and a new REST API. It's pluggable so you can use your own code or find tons of plugins to work with.

If you need help getting started there are generators to create custom code, produce boilerplate plugins, themes / 2 & custom fields for adding more descriptive data to your custom post types.

| improve this answer | |
2

Is this practical?

If you'd like to take advantage of all WordPress has to offer with regards to content organization, searching, a user-friendly back-end, easy extendability through plugins and themes - then yes, very practical.

If you just want to use WordPress themes/templates, then no - it would be somewhat insane to maintain a separate database, separate search functionality, and try to tack your current code onto WordPress just to display your site with a WordPress theme. It would be far, far more efficient and sensible to find a plain HTML/CSS theme and simply apply it to your site.

Would I somehow embed my PHP code inside WordPress pages?

A common approach would be to port your data into the WordPress database using WordPress's Custom Post Types and Custom Taxonomies, then create your own theme from scratch or modify an existing one using a child-theme in order to produce the markup you're after.

You could just hack your current code into theme templates - but that would largely defeat the purpose of using a WordPress theme in the first place, I'd imagine.

You could also just load the WordPress blog header (bootstrap) in you app to gain access to the WordPress environment - but again, kind of pointless if you're not intending to use any of WordPress's features.

Long story short, I'd recommend you spend some time reading up on WordPress before you commit to it. It doesn't have to be all-or-nothing - but in your situation I don't think the grey area makes a lot of sense.

| improve this answer | |
0

I wouldn’t necessarily switch to WordPress. If you want a quick solution that’s relatively easy to use, and you don’t need any particular customisation, it’s a popular choice. However, if you want lots of control, you are in for a mountain of frustration. WordPress themes are hugely complex. As long as you stick to whatever the theme designer had in mind, you will be fine. But if you deviate just a millimeter and want something done differently, you have to dive into the theme code, and this is where the pain starts. (It is much easier to create your own theme completely from scratch, if you need that amount of control.) The same applies to the system of plug-ins/extensions/add-ons.

I’m speaking from the experience of having run my own WP sites and having customised a few themes, and I can tell you that it wasn’t fun at all. At several points, I was very close to throwing it all away and just re-writing the thing myself, as this would have been a lot easier and faster and about a million times more fun. Operating a real-world WP site means constantly having to install updates and keeping track of what’s going on in the themes and plug-ins world. I personally find the WP experience very, well, ugly. (They have recently released a shiny new management UI based on a Node.js single-page application which is nice, but it doesn’t solve the mentioned problems.)

You’re possibly better off keeping your existing code and extending it, or looking at another CMS or framework that doesn’t get in your way so much, even if it means having to do a bit more work yourself. One such solution I’ve personally taken a look at is ProcessWire, although I haven’t actually used it in any project yet and I don’t want to promote it here, it is just an example for what else is out there. There are countless ways to (re)build your site; I’d think twice or three times about moving to WordPress (especially if your choice is purely based on the fact that it is popular), that’s all :)

| improve this answer | |
  • Oooh, I didn’t realise I was posting this on the WordPress stack exchange. I’m bracing for the storm of downvotes. Sorry. – Niels Dec 8 '15 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.