• I would greatly appreciate any advice and wisdom.

    I’m new to WordPress and want to build & design locally, test locally, then upload to my hosting server.

    I have some questions about “best practices,” how to ensure that local files and hosting files are not in conflict, and what I need to do so upload works OK.

    My hosting service now offers WordPress, which I have installed. I have also installed a local version that I will use with local testing server.

    I am trying to research, set up correctly, and proactively plan so upload will go smoothly. I apologize for the length of this inquiry — but I have recently been going through the nightmares of Vista, so I’m trying to plan ahead with this major new addition. I will end up with 3 blogs, 2 of which will bring major attention to WordPress.

    Before I get to my questions, here is some set-up reference information:

    HOST CONFIGURATION:< /br>
    My hosting service, APlus.net (Apache server) now provides WordPress — which I installed as follows:

    1. Host places mywebsite files in html folder in root directory, so WordPress installation path:< /br> /home/html/wordpress/

    2. On Host, MYSQL databases are automatically named the same as my user ID, and I use my same password. They are named: “UserID” & “UserID2” & “UserID3”

    3. Absolute path to MYSQL database =< /br> /var/db/mysql/mydatabasename

    4. Absolute path to my html folder = /home/partition/yourftpusername/html

    LOCAL CONFIGURATION:< /br>
    1. I use WAMP(Apache) with PHP and MYSQL + Dreamweaver — on PC/Vista (and may convert to MAC)

    2. Local WordPress installation path: < /br> C:\wamp\www\MyWebsiteName\WordPress\

    3. Testing server WordPress installation path:< /br> https://localhost/MyWebsiteName/WordPress/

    4. Installation:
    wp-config.php — I used same settings as HOST wp-config.php file, as follows

    Example:(real Name/User/Password not used)< /br>

    // ** MySQL settings ** //
    define('DB_NAME', 'johndoe'); // The name of the database
    define('DB_USER', 'johndoe'); // Your MySQL username
    define('DB_PASSWORD', 'johndoepassword');// ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

    < /br>
    QUESTIONS: BUILDING LOCALLY AND UPLOADING

    1. In LOCAL install, assigned logon username and password are different from HOST install. Will that present any upload problems?

    2. I use FTP to upload site and will use that with WordPress. Should I make any changes in PATH to avoid upload problems?

    2. Version issues:

      Host

    PHP Version: 4.4.4
    phpMyAdmin 2.6.2-pl1
    MySQL 4.1.22

      Local

    PHP Version: 5.2.3
    phpMyAdmin – 2.10.1
    MySQL client version: 5.0.37

    Host uses PHP default Version is 4, but I have option to use 5 (although they warn that changing from 4 to 5 may create instability and I may lose

    MYSQL databases — which, actually, is OK at this point because database is not yet populated).

    Locally, I use PHP 5 but have option to use 4.

    QUESTIONS: What is “best practice? Using same in both places, either 4 or 5? Would I have issues if I kept 4 on host but built on local using 5?

    5. ISSUES RE: BUILDING LOCALLY AND UPLOADING

    Any red flags I should be aware of as I build site locally before uploading?

    I have not yet studied how exactly to upload completed local WordPress setup/design/content — but, as I start out, I want to be sure I change anything that needs changing before I get too far along.

    For example:< /br>

      RE: Username & Password

    < /br>
    — any potential conflicts?

      RE: Paths — any changes I should make?

    < /br>

      RE: Database name issues:

    As long as I name my local MYSQL database the same as the name assigned automatically by my hosting service, and my online database is not yet constructed, am I safe in constructing database and php files locally and then uploading? Any precautions I should take?

      RE: wp-config.php and install.php

    < /br>

    — Will I run into any local vs host conflicts?

      RE: Local vs Host Files?

    < /br>

    Are there other files I need to take care with to avoid local vs host problems? Any critical files on local & host that should not be written over upon initial upload and then continuing building? Can local & host be synchronized, similar to other website files?

    Thank you for any pearls of wisdom.

    Aaron

Viewing 10 replies - 1 through 10 (of 10 total)
  • Lets knock off a few obvious issues. You are doing fine. BUT: I would differentiate between the theme and the data (posts). Locally I would just put in what I need to check the theme. There is no need to get involved in db transfers.

    The mysql details will be different. Fine. As you install you just need the new config.php.

    IMHO it is best to work on the same php version. Stay off php 5 for the time being.

    The real issue is the regular frequency of the WP upgrade / release / bug fix and the gyrating nature of the code therein in particular the mark up of widgets which is not only inconsistent but erratic.
    You are obviously computer literate so I would strongly suggest using ssh / svn so you can keep both / all your installs in sync easily.

    File paths are no problem. WP is very good in this regard. It always calls the variable. The important thing to do if you need to is follow that protocol but in a proper set up you shouldn’t need to be hard coding file paths into templates.

    Installing themes is a doddle. You just copy to the theme directory using ftp or ssh. No problem. HTH.

    Thread Starter aaron1948

    (@aaron1948)

    Thanks for taking the time to advise. A couple of questions:

    1. Data posts

    RE: “There is no need to get involved in db transfers.”

    One of my primary reasons for building locally is my need to compile a rather large db.

    Seems easier to do and test offline first.

    If db is names the same in both LOCAL and HOST, can I upload my LOCAL db and write over the HOST db, or should I just Import while logged on to HOST?

    2. RE: Theme uploads

    If I modify and tweak theme in LOCAL installation, I assume I just upload revised theme and copy over WP installed on Host.

    BUT I’m confused about this:

    In LOCAL installation, Worpress places several *.frm files in my local MYSQL directory at:

    C:/wamp/mysql/data/mydatabasename/

    Do I upload those *.frm files to HOST, where path is

    HOST
    /var/db/mysql/mydatabasename

    Thanks.

    DO NOT attempt to move a MySQL 5.x DB to a 4.X. You might get lucky if you know what your doing but then you’d know the answer to your second question: mysqldump and mysql command line programs. Expect some very nasty problems to be found in the future if your going to try anyway.

    WordPress does not store themes in the DB, they are just flat files and folders. .FRM is a mysql DB file on your Windows machine. You don’t want to move that anywhere without deep knowledge.

    Spend a few hours reading the MySQL install and migrations document for both your versions if you don’t believe me.

    Thread Starter aaron1948

    (@aaron1948)

    Thank you! I believe you ?? I’m in blog/MySQL learning mode.

    So I conclude that it’s best if I construct any major db (with lots of information) outside of my Local MYSQL and then, working from Host, import as a CSV file.

    (e.g., from Excel/Access/Open Office, etc. to a *.csv file — then, while on Host, import).

    I suppose I could also build on MySQL local, export to *.csv file, and then import *.csv into MySQL?

    I’ll read and research.

    Make sensible?

    I was trying to follow what you are attempting… but after a while I got lost. It seems to me you are over-complicating everything.

    Install XAMPP on your box. It will behave like a normal webserver.

    Try to have the same version of PHP and MySQl on live server (=your host) and your local install.

    You can build even the “content” locally (provided you take care of the version things!) and you export/import the database.

    Stay away from any “one-click” install offered by hosts! They are bad. Do manual install.

    Keep things simple and don’t worry for thing that are simple. E.g. if I have a local DB with username: moshu and pw: aaron – exporting from my computer to the host server will NOT change the user/pw because you can not install your local DB “over” the existing one on the host. You need to drop/delete those tables, so importing the local stuff will end up having the same user/pw in both places.

    p.s. Write shorter posts, writing long text is a bad habit ??

    Thread Starter aaron1948

    (@aaron1948)

    Thanks.

    1) RE: “Stay away from any ‘one-click’ install offered by hosts! They are bad. Do manual install.”

    Conclusion?:
    – APlus.Net (my host) offers WordPress. Install seemed more than “one click” — it had options.

    – Question: Should I still uninstall and do manual install?

    – Question: Re: Why is “one-click” bad. Can you direct me to information to read about why?

    2) Version Issue

    Conclusion?
    Given the stats below — on local, I conclude I should revert to older MySQL to mirror live. Correct?

    Live=
    PHP Version: 4.4.4 (option for 5)
    MySQL 4.1.22
    phpMyAdmin 2.6.2-pl1

    Local=
    PHP Version: 5.2.3
    MySQL client version: 5.0.37
    phpMyAdmin – 2.10.1

    RE: shorter texts. Thanks, I know. Am transitioning from print writer to web writer. Plus am creating major web portal with very large database, and wading thru “best practices.”

    Well, in my former life I also used to be a journalist in the print world… but there was a slogan in the office: He who writes long is capable of other crimes, too!

    Many host when offering the one-click thing they give you a “mutilated” WP or something that you cannot edit, backup etc. as in the case of normal manual (read: full control) installations. I don’t say aplus is doing the same – just a warning; I have seen too many desperate users coming here to complain…

    If you develop your content locally – meaning the DB will be exported to the live site, in my opinion the biggest issue is the compatibility of the MySQL versions. Again, I have seen too many examples of borked characters after a major move… And it’s not really a WP issue, it is more a MySQL glitch: even this forum was severely screwed up during a big move about 2 years ago.

    p.s. re: huge database. Be aware of the (MB) limitations of exporting/importing data!

    I agree that you seem to be massively over complicating yourself. I can only pick out odd points as they come up. The db config for local / host are different. So the config.php will be different. Assuming the mysql are similar this is just an import op.

    I would strongly advise striking Dreamweaver out of your plans.

    Theme development does not *overwrite* WP. Themes are discrete items each in their own dir.

    But here is the thing. WP can’t be used with any old db from access whatever. It needs to install its own. Any data that is going to be imported needs to match the structure.

    I can’t work out if you are a computer guru or if you haven’t got a clue what you are doing. ??

    Hello Salam Guys,

    I hope every one out there is enjoying life.

    I was also having the same scenario.

    Infact I developed my blog locally with WAMP server with same specifications as mentioned above and never realized that I can face such problem of importing the MySQL DB on live web host.

    Well just today morning I had to upload it online. I uploaded all my content files through ftp. And when I tried to import my database, I had to face the problem of version compatibility.

    I was searching for some help and then I came to this post. I read it and after few minutes I tried a trick… I modified each db table and then imported it separately to new db
    Thanks to Allah, its working fine now. Up till now everything is fine and I am still checking with, I hope everything will be smooth.

    Cheers ??

    Sajjad Naveed

    Here I will paste the trick I did.

    While exporting MySQL Dump file from latest version it was adding following lines at start

    -- Host: localhost
    -- Generation Time: Oct 31, 2007 at 01:14 PM
    -- Server version: 5.0.45
    -- PHP Version: 4.4.0
    
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

    I removed the following lines from each table

    -- Server version: 5.0.45
    -- PHP Version: 4.4.0
    
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

    `

    and after doing this trick to all tables and importing each table. I got my blog live. ??

    Regards,
    Sajjad Naveed

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Building locally, then uploading’ is closed to new replies.