Tag Info

Hot answers tagged

14

As of JetPack 2.2.1 there is now a local development/debug mode. http://jetpack.me/2013/03/28/jetpack-dev-mode-release/ use: define ('JETPACK_DEV_DEBUG', true); in your wp-config and you should have access to any modules that don't require a connection to function. Yay!


12

The solution I found that worked on my Mac running the builtin Apache2 was to add this to 'wp-config.php' define('FS_METHOD','direct');


9

The method in the link provided by @TracyRotton seems not to be working since Jetpack 2.0 and WordPress 3.4.2. Even replicating all database fields, it doesn't act as connected. As the OP question is about syncing a development and a production environments, maybe it is not possible. I haven't tested in-depth which modules work and which not, but ...


7

It is possible to trick JetPack by copying the DB field values from an activated install into your local install. On an install (remote) with JetPack connected search the 'wp_options' table for 'option_name' fields beginning with 'jetpack_', such as: jetpack_activated jetpack_options jetpack_nonce_{random_string} jetpack_active_modules Copy these fields ...


4

Inspired by brasofilo's latest solution, there's even an easier way, just open jetpack.php, search for /** * Is Jetpack active? */ public static function is_active() { return (bool) Jetpack_Data::get_access_token( JETPACK_MASTER_USER ); } and replace with this: /** * Is Jetpack active? */ public static function is_active() { return true; } ...


4

This is a permissions issue. wp-content/plugins must be writable by the web server user.


3

Install multi-site as subdomain setup. Do not use the sub-sites option. Go to Network Admin/Sites and select the site whose URL you want to change: Change the URL to the new domain. In your wp-config.php use define( 'COOKIE_DOMAIN', '' ); to be able to log in in both sites. You don't need a plugin for that.


3

It's empty because you're looking at it before it has a chance to be populated. The top of functions.php is too early. You should be doing it in a 'template_redirect' action. Or, better yet, use the Debug Bar plugin.


3

The two directories, where plugins can be located in line with normal mechanics are: wp-content/plugins wp-content/mu-plugins


3

If you want full Jetpack functionality, your development environment will need to be publicly queryable. You can set this up by making your dev address a subdomain, e.g. sandbox.mysite.com, setting that DNS record to point to the IP address where your development server is located, and possibly configuring your router/firewall to allow port 80 requests ...


3

It may be a conflict between the internal option 'home' or 'siteurl' and the access per pure IP address. WordPress doesn’t use just any server name, there is some redundancy which may get in your way here. You can try to resolve that by two constants defined in your wp-config.php: define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] ); // or // define( ...


3

This is really a server question and not specific to WordPress. Be sure mod_rewrite is enabled in Apache on your version of OS X. Google that. Restart Apache after making changes to httpd.conf. You may also need to add a blank .htaccess file in the /Users/yourusername/Sites folder so that WordPress can write to it.


3

What you posted will work fine for all links that are generated by WordPress: permalinks, script/style enqueues for local files, featured images, etc. I tend to define my Site URL and Home URL dynamically like this: <?php define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']); define('WP_SITEURL', WP_HOME . '/wp'); Note: HTTP_HOST isn't always present, ...


3

Update your wp_options table. Look for siteurl and home and change their values to point to your localhost, that is, http://localhost/mylocalsite. This should be enough to make your site work again. You don't need to find and replace all instances where the old url is present. For example you should not change the guid of your posts. Alse read this post ...


3

When you say moved WordPress, what do you mean exactly, Did you copy your entire WordPress installation from your localhost to your remote server without installing WordPress first on your destination host? Did you export your SQL database from localhost then import it to your remote server? Did you install WordPress on your remote server before copying ...


3

I use xip.io for this. What is xip.io? xip.io is a magic domain name that provides wildcard DNS for any IP address. Say your LAN IP address is 10.0.0.1. Using xip.io, 10.0.0.1.xip.io resolves to 10.0.0.1 www.10.0.0.1.xip.io resolves to 10.0.0.1 mysite.10.0.0.1.xip.io resolves to 10.0.0.1 foo.bar.10.0.0.1.xip.io ...


3

Edit file wp-config.php in root & define site url and home url: define('WP_HOME','http://example.com'); define('WP_SITEURL','http://example.com'); And go to admin dashboard and update permalink (Settings => Permalinks => Update).


2

This issue is solved. The permission problem has to do with how files are uploaded to the WordPress site while updating. The suPHP solution is my preference at this point because it is simpler and requires less permissions on files, but if you don't want to do that then you'll have to take care to get your FTP user playing nicely with WordPress. suPHP ...


2

With localhost, you need to make sure that your mod_rewrite is on. You can do this in your httpd.conf file in MAMP. MAMP > CONF > APACHE > ORIGINAL > httpd.conf. Uncomment this line: LoadModule rewrite_module modules/mod_rewrite.so


2

Ok, based on that, I'm almost positive that you need to re-enable permalinks for your site. You are probably missing your .htaccess file or it is missing WordPress's rewrite rules. Go to your admin and find Settings > Permalinks. Select an option, and click "Save Changes" twice (there is a quirk that this avoids). This will have WordPress automatically ...


2

I believe the wordpress URL and site URl are not set right. Please try to edit your wp-config.php adding these lines: define('WP_HOME','http://example.com'); define('WP_SITEURL','http://example.com'); Is your index on same folder as wp installation? if not, you need to place it there. I'm talking about placing the URL in the above lines, not the index on ...


2

Wordpress hardcodes the domain into many of its permalinks in the database. An easy solution is to download an SQL dump of the database on your host using phpMyAdmin or an SQL client, and then opening the SQL file in a (robust) text editor, assuming your database isn't enormous. Then run a Find / Replace for the old domain (localhost) and replace with ...


2

FTP credentials are fallback for when writing directly to the file system is not available. Naturally they take active FTP (or SSH) server - which is typical for any hosting out there, but not necessarily part of local installation. Essentially you have two options: Troubleshoot why direct file system access is not available to your WP installation. On ...


2

There are some awesome resources online to help you with this process. Good for you for setting up a local development environment. I think you will find it to be an awesome change to your workflow, but be prepared for some trial and error in getting it right. First of all, there is an excellent article on the Codex for setting up WordPress on MAMP: ...


2

You need to change the file permissions on your wp-content folder (and containing folders) to 755. On your setup you can do this with: sudo chmod -R 755 wp-content


2

All of your content is linked to your localhost install. I would suggest using a plugin like Search & Replace to amend your URLs. Also if you haven't already, you will need to change the two entries in the wp_options table (where wp_ is the prefix used). They are rows 0 & 37. These are your URLs for moving your site. The next time you move your site ...


2

This is the corect answer if ( $_SERVER["SERVER_ADDR"] == '127.0.0.1' ) { function livereload(){ ?> // mycode <?php } add_action('headway_body_close', 'livereload'); }


2

From personal experience sync between two different computers work best in one direction. For example your desktop is primary and notebook is precise mirror (yep, of whole directory tree preferably with tool that doesn't touch unchanged files). Two way sync gets messy very fast for web stack. If you need to actively work with same stack on different ...


2

Local web server is a must, it's pretty much generic web server stack (Apache, MySQL, PHP plus other bits) only running on your local computer. Deployment depends on how you manage your code: just resides on your computer - you will need to sync it to remote server in some way (FTP, SFTP, etc), any decent software for such is smart enough to transfer ...


2

See Moving WordPress « WordPress Codex and Backing Up Your Database « WordPress Codex and How to Move WordPress Blog to New Domain or Location » My Digital Life and possibly Giving WordPress Its Own Directory « WordPress Codex Deleted this added link as it advocates using a texteditor to change URLs in the dump; that will break serialized data. Use the ...



Only top voted, non community-wiki answers of a minimum length are eligible