简体   繁体   中英

Should I move my PHP site into a CMS like Wordpress?

I have coded a site that I am proud of in PHP. Everything is working fine. But I was told the site needs to be built around CakePHP.

I am somewhat new to building dynamic websites so am not sure if he's correct or not. Right now, if I want to see the data, I go to PHPMyAdmin. If I want to operate on the code, I just open up the PHP files.

Is there a better way that I don't know about? I am not sure why I should re-code the site in CakePHP. Should I? Please explain.

Also, does CakePHP come with certain design templates like Wordpress?

There's more than one way to skin a cat.

There is nothing wrong in sticking with plain PHP if you are comfortable maintaining the contents in PHPMyAdmin. You can even make the site dynamic using GET parameters (example.com/article?id=123) or using a routing framework that allow nice url's such as (example.com/article/hello-world.html).

Personally, I prefer sticking with plain PHP for personal website projects, instead of becoming dependent on a framework or CMS.

No matter if you choose to stick with plain PHP, a framework or a CMS, you still need to figure ways to:

  • Route the user request to what ever resources the page should show to the user.
  • Security ("never trust user-submitted data") - frameworks help you get security right, and again - you can also sanitize user requests in plain PHP.
  • Database queries shall be made ( SELECT * FROM articles WHERE id = 123 ), and SQL injection shall be prevented.
  • Etc.

Here are a few PHP App Tutorials to get the juices flowing:

WordPress is a CMS - Content Management System. It is a prebuilt platform that is already for the web, out of the box.

CakePHP, Symfony, Zend, Laravel, etc. These are frameworks, they are not out of box solutions and require a great deal of coding effort, knowledge and time.

Which one is better is subjective and a matter of personal taste. It depends what you want to do, what your experience is more geared towards. Research the different options, and see whats best for you.

Having said that, some of the most populace sites in the world use WordPress.

There are many reasons why to use frameworks, CMS - and many why not to use them.

  • Frameworks help you to focus on your own ideas by often doing the boilerplate stuff for you. Further, they help to keep your code clean. After all, they should ease the development task. Your site is up and running, so you only have to think about further development and maintenance. If you can handle your code, you're fine.
  • CMS help you maintain content without coding or low-level database work, which is a pretty "techy" task. If your site is being maintained by more people, a CMS might be a thing to think about.
  • Think about security. Widespread systems often get quick fixes for vulnerabilities which would never have been discovered without those millions of running installations. So your own custom system might be pretty secure, even with plenty of security issues being present.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM