• Anon

    (@jeffpannone)


    I’m trying to streamline my wordpress development from localhost to the web. currently my process is to build locally, then upload to an authenticated url “dev.domain.com” for testing/tweaking with client, then push to “domain.com” for the launch.

    When I push from my local server to web, I export/import pages so to retain any Page ID’s and ultimately save myself a headache where I’d be updating any relative PHP/CSS.

    The problem I’m seeing is that sometimes Page ID’s change. I’m thinking it has something to do with creating a page, then deleting it and throwing off the ID’s in the WP database? I’m not really certain, but I’d love some advice on this technique and if there are better ways of doing it.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • What I do when going from local to the web, is I not only export all my content from WordPress, but I’ll also export my entire database, using phpMyAdmin. Then when you set up the database on the web, use that export to create the new database. Then set up your web install of WordPress. There are a few things you’ll need to change in the database. WordPress saves your URL in a couple places in the options table.

    You’ll need to change the siteurl, which is usually the first entry in that table, and then the home setting, which is around 37th in that table.

    And then your links to media might be messed up, so there’s a really nice plugin called Velvet Blues Update URLs which will update your URLs from your old site to your new one.

    Thread Starter Anon

    (@jeffpannone)

    this makes sense. velvet blue will save quite a bit of time. thanks.

    I have another workflow question you might be able to answer…

    I setup all my client sites in this format [htdocs/client_com] and use the URL “https://localhost/client_com/” for developing. however, this forces me to use absolute paths for navigation as wordpress is looking in the root [htdocs/].

    I want to set it up so that I can use the relative paths in my wordpress/php files (i.e. “/” for home, “/blog” for blog page, etc..), but maintain my development server structure. This isn’t a huge issue, but it would make the file management/going live process a bit easier.

    I’m curious if there is an easy workaround. If you have any advice, I’d love to hear it.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘localhost to web; page ID changes’ is closed to new replies.