Jump to content

Check If Cms Is Already Installed


lundager

Recommended Posts

Hello, I'm making my own CMS, not a simple one neither a very advanced one. I just finished my installation page, where users can input their database information, and can continue on to create their admin account. My question is, I'm having a bit of a struggle figuring out, how I should check if the CMS has already been installed, and redirect the users to the login screen. I sneak peaked at wordpresses code, and saw that they check their cache and some other advanced stuff, that I couldn't really understand 100%.

 

So does anybody have a suggestion on how I should manage to do this, or could tell me how I can do it the same way wordpress does, or something close to that!

 

Thank you ! biggrin.gif

Link to comment
Share on other sites

  • 6 months later...

How did you solved your installation check?

I'm searching for the best way to do it because it is a proccess that must run at the begining on every request.

I'm trying to develop my CMS light and fast as possible and Wordpress costs lot of server resources and takes too long to send a response back.

Christian, i want to set a constant as you told, but this only makes sense to be defined after the instalation was checked.

WP makes one select for each db table to see if it exists, wouldn't be better to run only one sql statement to get the full schema?

 

Thanks

Link to comment
Share on other sites

I suggest you try it this way:

1) index.php starts

2) it checks whether there is installation.php file

3) if there is no ===> run cms

4) if there is ===> run/( redirect to) installation.php

 

And at the end of installation of the system you need to delete installation.php file.

Link to comment
Share on other sites

Thank you for the answers.

 

I know this technic of renaming the installation folder after installing, it is used by XTCommerce (or XTC Modified, open source version), it is a shop system which i'm familiar with. But i don't want to do it this way :)

 

I will take a look to Composer, but doesn't it require that every host where i install my application has Composer installed?

Link to comment
Share on other sites

I will take a look to Composer, but doesn't it require that every host where i install my application has Composer installed?

Who doesn't have composer installed these days? Even if you don't, it's a single simple command to install it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.