Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7175093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:12:31+00:00 2026-05-28T16:12:31+00:00

I am making a mini CMS for two sites and am storing some basic

  • 0

I am making a mini CMS for two sites and am storing some basic things like a “Title Name” that will be displayed on every page, “Phone Number” etc

The most direct thing to do, would be perform a query every time a page loads to access the title name and print it to screen. This however seems to be an unnecessary thing.

I am weighing up the following options:

  1. When a user saves the site title, a file is printed, ie. ‘site_name.txt’ which simply stores the site’s name; when the site name is needed this file is merely included.

  2. A config file is written/updated every time one of these repetatively used variables is changed. These variables could be stored like so:

    $site_title = “insert name here”;

    $phone_number = “xxx’;

    Then simply include this config file on every page and refer to the variables.

Is this how sites like WordPress do things?

Am I wasting my time thinking about this or is it worthwhile thinking of ways to reduce sql calls on a CMS like this that has a lot of custom data stored in a db? Are there other options I’m unaware of that are far more efficient?

Thanks for your time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:12:32+00:00Added an answer on May 28, 2026 at 4:12 pm

    It seems fine to keep it in a config file, but if you want more than one site on your system, then you would have to handle that somehow. I also see no problem in keeping that information in the database, but I would suggest implementing a simple cache if you choose to do so. When you need the page title, for instance, you check to see if it is cached. If it is, you take it from there, and if not, you run a database query. That will save you many, many SQL queries over time and thereby eliminates the main reason to not store this data in the database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have a mini app that consists of title, thumb, lg_image, url
I am making an app that has a basic tableview where users can add
I'm making a mini ORM for a Java program I'm writing... there is a
Making an adobe flex ui in which data that is calculated must use proprietary
Making UML sequence diagram in VS 2010RC I've observed that there is no activation
After making some changes in my models (eg. new field in a model and
making a new jsp and got a mock-up from some analyst. Notice the sections
I am working on making a mini app using Json parsing . Output I
I have a mini linux PC (headless), and I'd like to use it as
Making a simple three question PHP quiz. Each question is displayed on a page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.