Jump to content
eydun

Rename index.php

Recommended Posts

Hello.

I just found ProcessWire and I am very impressed. It fees like Christmas Eve digging into the system.

I would like to use it right away in some of my old websites that are built by custom-made code.

Is it possible to rename the main "index.php" to some other name, e.g. "processwire.php", and modify the .htaccess accordingly?

I ask because currently the old system is occupying the filename index.php (when the whole website has been converted to Processwire, then I will delete the old system).

Edited by eydun

Share this post


Link to post
Share on other sites

Well, it might be technically possible, but there's no core support for it, and I wouldn't recommend it 🙂

In this case you would probably have to modify index.php, .htaccess, and at least some other core files: wire/core/ProcessWire.php, wire/modules/Process/ProcessLogin/ProcessLogin.module, and wire/modules/Process/ProcessPageView.module. Modifying core files is never a good idea, as it makes updating ProcessWire difficult (usually you can just replace certain core files and that's it), and there's also no guarantee that some third party module etc. isn't expecting the core to remain as-is.

So, long story short: if you really have to, you can of course modify it, but there's no guarantee that things will work as expected afterwards. If possible, I'd recommend developing the ProcessWire site elsewhere (subdirectory, or another domain, or locally) and then replacing the old site in one go. 🙂

 

  • Like 2

Share this post


Link to post
Share on other sites

A quick thought: make a subdirectory within the old site and develop the new site there. Delete all the old stuff (remember to leave the new site directory). Then move everything in the new site directory to the main directory. Done.

Gideon

Share this post


Link to post
Share on other sites

Not sure if renaming index.php would be of any use. If you point the .htaccess to use the different index.php, you're old site will be gone anyway.

Does your hoster support creation of subdomains (something like new.mysite.com)? Then I'd place the new setup into a subdirectory and point that subdomain to that directory. When you're done, you simply have to point your regular domain to that subdirectory (no need to move any file afterwards).

Share this post


Link to post
Share on other sites

Thank you all for your helpful comments.

I think I will go with the solution building the new site in a sub-directory.

The old site is quite large (100+ pages), and therefore I plan to merge some content from the new processwire-subdirectory via the fantastic API that processwire provides  into the old site, during the conversion-process. Quite messy, I know. But with such a complex-reducing system as processwire, I think it is doable.

Thanks again!

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...