Tag Info

Hot answers tagged

19

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. Update, since around v3.3 another local development trigger was added via filter instead ...


18

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 ...


6

You could also try this. In IIS manager Go to Application pools and choose the one used by your Wordpress Blog. Right Click and choose Advanced Settings... Change the Identity to LocalSystem Click OK to save changes. Then on Sites, Choose your Wordpress Blog from the sites list Right Click on it and click on Edit permissions Go to security tab and ...


5

You can use wp-config.php to change the site url depending on where the site is accesed from, using $_SERVER['REMOTE_ADDR']. Mine has something like this: if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1' || $_SERVER['REMOTE_ADDR'] == '::1') { // accesing site from my local server define('WP_SITEURL', 'http://localhost/mysite/'); define('WP_HOME', ...


4

This is really a server question and not specific to WordPress. Be sure mod_rewrite is enabled in httpd.conf Apache on your version of OS X. (Google that with your version of OS X.) 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 the file has the correct ...


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

Why didn't you try to copy your live website manually. It's not as easy as using a plugin but much more error proof. You will need to follow these steps. Make a dump of MYSQL database on server. mysqldump -u username -p -h localhost dbname > domain.sql Create a archive of your WordPress website on server. tar -czf domain.tar.gz domain.com Download ...


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

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

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

Simplest method to put your website in Maintenance mode, is to create a .maintenance file in your WordPress root folder with following content. <?php $upgrading = time(); ?> Make sure you place this file in same folder as your wp-load.php file. I just said that because in case you have WordPress installed in a sub-folder. Whenever you are ready to ...


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).


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

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: find . -type d -exec sudo chmod 755 {} \; Please note that using chmod -R 755 will mark both directories and files as 755.


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

Add this to your wp-config.php: const JETPACK_DEV_DEBUG = TRUE; This makes it possible to use features on localhost that don’t require a connection to wordpress.com. See the announcement post on jetpack.me for the background. For your own plugins, learn that lesson: Do not rely on working outgoing connections. Respect your users privacy, and explain in ...


3

Go to Admin Panel > Settings > General and replace localhost with your ip-address for WordPress Address (URL) and Site Address (URL) and see if it works. Also don't forget to put your WAMP server online.


2

The jetpack_development_mode filter: I just want to mention the jetpack_development_mode filter. You can simply use: add_filter( 'jetpack_development_mode', '__return_true' ); to run JetPack locally. A tiny plugin: To avoid having to modify the wp-config.php file with the usual trick: define ('JETPACK_DEV_DEBUG', true); you can now control it via ...


2

get_template_directory() returns a filesystem path-- that is, it returns the path to the file as it would appear if you were browsing it on the local machine via a file browser. Return Values (string) Absolute path to the directory of the current theme (without the trailing slash). ...


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

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

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 ...



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