The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End [SOLVED]Development Copy of WordPress?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #164548
    Steven Morgan


    As I understand it, I can run a copy of WordPress locally that uses a remote database. Uses everything except the home and site_url from the DB. Perfect for development, however I can’t get it to work.

    In my wp-config I have all the correct credentials for my database on a remote server.

    In wp-content I created a “db.php” file with the following:

    add_filter ( 'pre_option_home', 'demo.local:8888' );
    add_filter ( 'pre_option_siteurl', 'demo.local:8888' );
    function test_localhosts( ) {
      if (strcasecmp($_SERVER['REQUEST_URI'], '/') {
         return "";
      else return false; 

    Any idea what needs to be changed? Rookie here.

    Steven Morgan

    I simply added my home_url and site URL in my local wp-config file.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.