<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Anmari &#187; hosting</title>
	<atom:link href="http://webdesign.anmari.com/tag/hosting/feed/" rel="self" type="application/rss+xml" />
	<link>http://webdesign.anmari.com</link>
	<description>Simply effective web services</description>
	<lastBuildDate>Wed, 16 Nov 2011 05:01:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Moving wordpress</title>
		<link>http://webdesign.anmari.com/822/moving-wordpress/</link>
		<comments>http://webdesign.anmari.com/822/moving-wordpress/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 03:02:35 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[hosting]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=822</guid>
		<description><![CDATA[Step by Step Guide to Moving the wordpress admin code and optionally relocating your content directory.  This facilitates sharing of wordpress code, database and hosting between wordpress instances or installations
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/728/multiple-blogs-domains-with-wordpress/' rel='bookmark' title='Multiple Blogs, Domains with wordpress'>Multiple Blogs, Domains with wordpress</a> <small>The configuration features now available in wp-config.php now offer you a great deal of flexibility if you have multiple domains...</small></li>
<li><a href='http://webdesign.anmari.com/336/timezones-wordpress-ical-php/' rel='bookmark' title='Timezones, WordPress, Ical, Php&#8230;.'>Timezones, WordPress, Ical, Php&#8230;.</a> <small>What a lot of fun this can be (not!) Your Ical file may have a timezone specified, the event may...</small></li>
<li><a href='http://webdesign.anmari.com/113/category-specific-css-to-achieve-a-print-cover-page-css-look/' rel='bookmark' title='Category specific css to achieve a print &#8220;cover page&#8221; css look'>Category specific css to achieve a print &#8220;cover page&#8221; css look</a> <small>For a school&#8217;s online newsletter we wanted the &#8220;photo of the week&#8221; category to present differently from other posts. Ideally...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Steps:</p>
<h3>If changing database or moving hosting or domain:</h3>
<ol>
<li>Make a DB backup, using a backup tool or phpmyadmin &#8211; we need the sql file in a format we can edit.  (Note you might want to take the opportunity to clean up the options table first, and get rid of any orphaned options &#8211; there are plugins to help with this. )
<ol>
<li>Find the siteurl options &#8211; fix the url if necessary (eg if moving domains) &#8211; this will help avoid the &#8220;white screen&#8221; problem.</li>
<li>If you want to change the table prefix, now is the time.  Do a search and replace on <strong>`wp_</strong> and <strong>&#8220;wp_</strong> and <strong>&#8216;wp_. </strong><em>Yes you could do wp_, but hey this is safer what if there was a wp_ in the middleof a word?</em></li>
<li>You may to just check if anywhere there are any domain or location specific urls specified with absolute urls.<em> Eg: search and replace &#8220;http://yourolddomain/youroldwplocation/&#8221; with &#8220;./&#8221;</em></li>
</ol>
</li>
</ol>
<h3>Moving hosts</h3>
<p>Check whether the <a title="Wordpress guide to editing wp-config.php" href="http://codex.wordpress.org/Editing_wp-config.php#Possible_DB_HOST_values">localhost specification</a> needs to change in wp-config.php file.  Eg: going to icdsoft, you may need <strong>localhost:/tmp/mysql5.sock.<br />
</strong></p>
<h3>Moving wordpress code location</h3>
<ol>
<li>Move the WordPress Code
<ol>
<li>Move your entire word press directory to where you want to keep it &#8211; eg: down a level: eg to &#8230;/wp</li>
<li>Optionally move the <strong>wp-content</strong> sideways or somewhere else</li>
<li>Create a copy of the index.php file and put it into the original directory
<ol>
<li><strong>Edit index.php</strong> and insert the new subdirectory into the file path.<br />
Ie: <span style="color: #ff0000;">change </span><br />
<em><strong>require(&#8216;./wp-blog-header.php&#8217;);</strong></em></li>
<p><span style="color: #ff0000;">to</span><br />
<em><strong>require(&#8216;./wp/wp-blog-header.php&#8217;);</strong></em></p>
<li>Save and Exit.</li>
<li><strong>Test </strong>-  Browse to the blog url.  You should see your website <strong><em>but lacking style!</em></strong></li>
</ol>
</li>
<li>Define where Content should live,
<ol>
<li> leave it there or move it sideways.. whatever&#8230;</li>
<li>Now go to the new subdirectory wp and edit the <strong>wp-config.php</strong>.  Add or change the following lines at the end of the file
<ul>
<li> define( &#8216;WP_CONTENT_URL&#8217;, &#8216;http://yourdomain/yoursubdirifany/wp/wp-content&#8217;);</li>
<li> define( &#8216;WP_CONTENT_DIR&#8217;, $_SERVER['DOCUMENT_ROOT'] . &#8216;/yoursubdirifany/wp/wp-content&#8217; );</li>
<li>define(&#8216;WP_SITEURL&#8217;, &#8216;http://yourdomain/yoursubdirifany/wp&#8217;);</li>
</ul>
</li>
</ol>
<ol>
<li>Check you also have <strong>at the end of the file</strong>
<ul>
<li> define(&#8216;ABSPATH&#8217;, dirname(__FILE__).&#8217;/');</li>
<li> require_once(ABSPATH.&#8217;wp-settings.php&#8217;);</li>
</ul>
</li>
<li>Save and Exit.  Test &#8211; refresh the browser window and now there should be <span style="color: #800080;"><em><strong>style!</strong></em></span></li>
</ol>
</li>
</ol>
</li>
</ol>
<h3>Move the Uploads folder</h3>
<ol>
<li>You must check out what the upload path spec is doing. In 2.7 the default will put uploads under your main wordpress folder in a wp-content folder.   This does not make sense.   If you have problems &#8211; use the full url path. It may be a good idea to update this using multiple websites from one instances. Logon as admin, got to settings &gt; miscellaneous and change before uploading</li>
</ol>
<h3>Test, Test</h3>
<ul>
<li>Primarily you will be testing your plugins that they are using these wordpress constants</li>
<li> Browse your website, check all the areas where plugins should be doing something</li>
<li>Test all the areas that do some kind of upload (shops, members)</li>
<li>do all the actions, comments, subscribe etc</li>
<li>Login as admin, browse around, check all is as it should be!</li>
<li>If you find a plugin that does not work, first check you have the latest version, then tell the author by commenting at wordpress or on the plugin page .  It would be nice if you would log it here too.</li>
</ul>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/728/multiple-blogs-domains-with-wordpress/' rel='bookmark' title='Multiple Blogs, Domains with wordpress'>Multiple Blogs, Domains with wordpress</a> <small>The configuration features now available in wp-config.php now offer you a great deal of flexibility if you have multiple domains...</small></li>
<li><a href='http://webdesign.anmari.com/336/timezones-wordpress-ical-php/' rel='bookmark' title='Timezones, WordPress, Ical, Php&#8230;.'>Timezones, WordPress, Ical, Php&#8230;.</a> <small>What a lot of fun this can be (not!) Your Ical file may have a timezone specified, the event may...</small></li>
<li><a href='http://webdesign.anmari.com/113/category-specific-css-to-achieve-a-print-cover-page-css-look/' rel='bookmark' title='Category specific css to achieve a print &#8220;cover page&#8221; css look'>Category specific css to achieve a print &#8220;cover page&#8221; css look</a> <small>For a school&#8217;s online newsletter we wanted the &#8220;photo of the week&#8221; category to present differently from other posts. Ideally...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/822/moving-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multiple Blogs, Domains with wordpress</title>
		<link>http://webdesign.anmari.com/728/multiple-blogs-domains-with-wordpress/</link>
		<comments>http://webdesign.anmari.com/728/multiple-blogs-domains-with-wordpress/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 02:22:19 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[hosting]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=728</guid>
		<description><![CDATA[The configuration features now available in wp-config.php now offer you a great deal of flexibility if you have multiple domains parked at the same host or multiple blogs where you wish to share one or more of the database or  the code. Move the wp-code First of I&#8217;d suggest keeping the wp-code out of the [...]
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/822/moving-wordpress/' rel='bookmark' title='Moving wordpress'>Moving wordpress</a> <small>Step by Step Guide to Moving the wordpress admin code and optionally relocating your content directory. This facilitates sharing of...</small></li>
<li><a href='http://webdesign.anmari.com/1160/wordpress-constants/' rel='bookmark' title='WordPress Constants'>WordPress Constants</a> <small>How should plugins cope with a relocated wordpress in another folder?...</small></li>
<li><a href='http://webdesign.anmari.com/135/improve-your-wordpress-webs-security-prevention/' rel='bookmark' title='Improve your wordpress web&#8217;s security &#8211; Prevention'>Improve your wordpress web&#8217;s security &#8211; Prevention</a> <small>Easy improvements for the non-technical: are you displaying your username for all the hackers to see? Go to your wordpress...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The configuration features now available in <a title="How to edit wp-config" href="http://codex.wordpress.org/Editing_wp-config.php">wp-config.php</a> now offer you a great deal of flexibility if you have multiple domains parked at the same host or multiple blogs where you wish to share one or more of the database or  the code.</p>
<h2>Move the wp-code</h2>
<p>First of I&#8217;d suggest keeping the wp-code out of the main directory.   Read <a title="instructions on how to give wordpress it's own directory" href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">Giving_WordPress_Its_Own_Directory</a></p>
<p>This will give you the flexibility of serving other code more easily.  Eg: one parked domain may be redirected to a subdomain not using wordpress at all.</p>
<p>Defining the siteurl overrides the option table.  Plugin developers should use this and not fetch it from the options table.</p>
<pre>define('WP_SITEURL', '<span class="external free">http://example.com/wp'</span>);
define('WP_HOME', '<span class="external free">http://example.com</span>');</pre>
<h3>Index.php example:</h3>
<pre>if (strstr($_SERVER['SERVER_NAME'], "onedomain.com")) {
    // serve up the default wordpress index.php code
    define('WP_USE_THEMES', true);
    require('./wp/wp-blog-header.php');
}
elseif (strstr($_SERVER['SERVER_NAME'], "anotherdomain.com.))
{
    // redirect to the subdomain, passing the query string along
    header( 'Location: http://subdomain.anotherdomain.com'.$_SERVER['REQUEST_URI']) ;
}</pre>
<h2>If statement</h2>
<p>In the wp-config.php file, code an if statement similar to above  to determine what your url request is (eg: which domain name) and set the appropriate field to achieve the effect noted below.</p>
<h2>Plug-in authors beware &#8211; plugins must be tested with these various schemes</h2>
<p>Plugins must use these constants or run the risk of not working on some installations.  Users should check all aspects of their plugins.</p>
<h2>Configuration values</h2>
<h3>Multiple Installations in One Database</h3>
<pre>// You can have multiple installations in one database if you give each a unique prefix
$table_prefix  = 'r235_';   // Only numbers, letters, and underscores please!</pre>
<pre>define('DB_NAME', '<strong>MyDatabaseName'</strong>); // Example MySQL database name</pre>
<h3>Share Code, but not Themes or Plugins</h3>
<p>Move the wp-content directory and define the following:</p>
<pre>define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content' ); and
define( 'WP_CONTENT_URL', '<span class="external free">http://example/blog/wp-content'</span>);</pre>
<h3>Warning if Moving</h3>
<p>Don&#8217;t forget to change the settings in the <a title="Miscellaneous SubPanel in admin" href="http://codex.wordpress.org/Settings_Miscellaneous_SubPanel">Miscellaneous settings</a> for your uploads</p>
<h3>Advanced Options</h3>
<p>There are more advanced options too, using for example:</p>
<pre>  define('TEMPLATEPATH', get_template_directory());
  define('STYLESHEETPATH', get_stylesheet_directory());

Note: beware:
Multiple domains sharing the same wordpress installation must have the same permalink structure - changes to one will edit the .htaccess, which will then override the previously set permalink.</pre>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/822/moving-wordpress/' rel='bookmark' title='Moving wordpress'>Moving wordpress</a> <small>Step by Step Guide to Moving the wordpress admin code and optionally relocating your content directory. This facilitates sharing of...</small></li>
<li><a href='http://webdesign.anmari.com/1160/wordpress-constants/' rel='bookmark' title='WordPress Constants'>WordPress Constants</a> <small>How should plugins cope with a relocated wordpress in another folder?...</small></li>
<li><a href='http://webdesign.anmari.com/135/improve-your-wordpress-webs-security-prevention/' rel='bookmark' title='Improve your wordpress web&#8217;s security &#8211; Prevention'>Improve your wordpress web&#8217;s security &#8211; Prevention</a> <small>Easy improvements for the non-technical: are you displaying your username for all the hackers to see? Go to your wordpress...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/728/multiple-blogs-domains-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

