We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27590
    • 5 Posts
    Hi everyone,

    I am very new to MODx and CMS’s in general. I am putting together a photography web site using Dreamweaver CS3, MAMP as my testing environment and my pages have a .php extension.

    I have just learned that I should really have a CMS and I am interested in using MODx. However I don’t know at what point the CMS comes into the development of the site?

    My questions are:

    Can I install MODx now and use it with the pages that I have already built, or do I have to build the pages from scratch within MODx?

    Can I keep my .php extension or should the pages have an .html extension?

    I would really appreciate any help with this.

    Thanks.





      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Pages should only have a .php extension if they include PHP code (<?php ... ?>), otherwise they should have .html endings. If your pages don’t have any PHP code, why force them through the PHP parser and put the unnecessary load on the server?

      Depending on how complex your pages are, and if they actually do contain PHP code or not, you can use the MODx "Import" feature to import your .html pages into MODx. Then you can work with them to incorporate them more fully into the best practices of MODx. The best thing to do to begin with is to install it locally, and check the "demo site" box when installing. Then examine the resulting complete demo site to see how MODx handles things.

      You can also take a look around on my site; the guest login is in my post footer. http://sottwell.com/modx-from-the-inside.html may also be helpful, although it is only a beginning. There are a number of other sites with articles and tutorials as well. The wiki has a growing number of pages; these are particularly helpful to new users http://wiki.modxcms.com/index.php/Category:Beginners
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 27590
        • 5 Posts
        Thankyou Susan,

        That’s really helpful I will do what you suggest.

          • 28150
          • 155 Posts
          Slam38,

          It sounds like this has been done all locally, correct?

          If so, then Susan’s recommendations are 100% spot on.

          If you are a user that already has a site that has been optimized for search engines and been indexed, you may be more sensitive to a transition of being forced to rename your files. You can actually have MODx rename your files to be PHP files.

          From the admin interface, click Tools > Configuration. Click Friendly URLs then "Yes" to see more options. From here, you can set a prefix and suffix for each page. The default for friendly URLs is .html, but you can certainly use anything you want at this point.

          This probably doesn’t fix the problem for you, but just in case someone ever comes across this in search...that’s your answer wink

          - John
            • 3749
            • 24,544 Posts
            Note that if you import the files into MODx as documents and they contain PHP code, you’ll have to move the PHP code into snippets.

            This may also give you some ideas: http://bobsguides.com/porting-your-site-to-modx.html
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting