wordpress page change through host server?

Discussion in 'Programming' started by loannet, Aug 25, 2009.

  1. #1
    Need some help here, I need to modify a page on a wordpress site to add some code for a widget I need to install...when I FTP into the server there is no actual page listed for the website, unlike how a website built via html would list out all of the pages...how do you directly access pages in wordpress for modification without using the wpadmin feature...hopefully this is clear...thx
     
    loannet, Aug 25, 2009 IP
  2. kblessinggr

    kblessinggr Peon

    Messages:
    539
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #2
    All wordpress content is stored in the database, the theme/template is stored in /wp-contents/themes

    Wordpress dynamically present the content in the theme on the fly. Statically generated content is very old skool and impractical.

    If you need to modify a widget, your best bet is to look at the widgets files themselves (typically in wp-content/plugins if installed as a plugin, otherwise you may have to hack up some of the files in wp-include)
     
    kblessinggr, Aug 25, 2009 IP
  3. loannet

    loannet Well-Known Member

    Messages:
    636
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    155
    #3
    So there is no way to access the file in the database to adjust?


    The problem I am having is that wordpress is altering code for a widget I am trying to install on my site, is there anyway around this? The widget provider sugested I try to direct access the page and work around the wordpress functionality...thanks
     
    loannet, Aug 25, 2009 IP
  4. kblessinggr

    kblessinggr Peon

    Messages:
    539
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It would be highly ill-advised to try to access the mysql database file directly, and quite impractical since it would take longer to modify without breaking it than you could learn how to do it via wordpress's own class wrappers.


    Depends on the widget, and what's being altered, the provider was probably talking bout the function files or widget files and not the content source (the database). For all we know you may just want to change the theme's CSS definition.
     
    kblessinggr, Aug 25, 2009 IP
  5. loannet

    loannet Well-Known Member

    Messages:
    636
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    155
    #5
    Thanks for the info...

    Quick follow up question, as wordrpress is totally database driven, what happends if you want to change servers, how do you transfer the files to a new server or back up this info, I have the email backup once per week, but the site has 300 pages of content, how do I back up this data if I wanted to transfer...?
     
    loannet, Aug 26, 2009 IP
  6. kblessinggr

    kblessinggr Peon

    Messages:
    539
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Most hosting providers that come with a Cpanel backend also come with phpMyAdmin. Upon clicking that icon in cpanel, you end up at the PhPMyAdmin backend.

    You find your database name, say username_wp, click on it
    then you click on the 'export' tab.
    Select all the tables, choose SQL format, and make sure structure and data is checked. Then check the box for save as a file, then it saves.

    On the file side of things, back up your wp-content folder.

    On the new server (with cpanel)
    1) Create a database under the mysql icon and add a user to it.
    2) Goto PhpMyAdmin, select that new database, click Import and select the file you made above.
    3) Install a fresh copy of wordpress (latest version preferably), and re-upload the content of wp-content which contains your themes, plugins, uploads.
    4) open up the wp-config-sample.php file, and provide it with the new database name, username, etc. Save it as wp-config.php into the root folder.

    When you goto your new server front page, wordpress should see that data already exists in the database (since you exported then imported), and will just use that information instead of prompting to install.

    If you ever get to that point where you're switching hosting, even if its not cpanel-based, keep me in mind as I can transfer a wordpress site in typically 30 mins or less.
     
    kblessinggr, Aug 26, 2009 IP