Title: Scriptrunner (Doug Sparling)'s Replies - page 22 | WordPress.org

---

# Scriptrunner (Doug Sparling)

  [  ](https://wordpress.org/support/users/scriptrunner/)

 *   [Profile](https://wordpress.org/support/users/scriptrunner/)
 *   [Topics Started](https://wordpress.org/support/users/scriptrunner/topics/)
 *   [Replies Created](https://wordpress.org/support/users/scriptrunner/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/scriptrunner/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/scriptrunner/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/scriptrunner/engagements/)
 *   [Favorites](https://wordpress.org/support/users/scriptrunner/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 316 through 330 (of 520 total)

[←](https://wordpress.org/support/users/scriptrunner/replies/page/21/?output_format=md)
[1](https://wordpress.org/support/users/scriptrunner/replies/?output_format=md) 
[2](https://wordpress.org/support/users/scriptrunner/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/scriptrunner/replies/page/3/?output_format=md)…
[21](https://wordpress.org/support/users/scriptrunner/replies/page/21/?output_format=md)
22 [23](https://wordpress.org/support/users/scriptrunner/replies/page/23/?output_format=md)…
[33](https://wordpress.org/support/users/scriptrunner/replies/page/33/?output_format=md)
[34](https://wordpress.org/support/users/scriptrunner/replies/page/34/?output_format=md)
[35](https://wordpress.org/support/users/scriptrunner/replies/page/35/?output_format=md)
[→](https://wordpress.org/support/users/scriptrunner/replies/page/23/?output_format=md)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Home page showing full post, not summary](https://wordpress.org/support/topic/home-page-showing-full-post-not-summary/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/home-page-showing-full-post-not-summary/#post-4173763)
 * The feed has a one hour cache. If you just changed it, you’ll probably have to
   wait a bit.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WordPress Changing URL Error](https://wordpress.org/support/topic/wordpress-changing-url-error/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/wordpress-changing-url-error/#post-4173744)
 * Check out the Codex:
 * [Changing The Site URL](http://codex.wordpress.org/Changing_The_Site_URL)
 * [Moving WordPress](http://codex.wordpress.org/Moving_WordPress)
 * If you have moved changed your WordPress install directory name from “wordpress”
   to “blog,” you’ll need to update
 * `siteurl` to be `http://www.mysite/blog`
 * and
 * `home` to be whatever you want the home page URL to be, probably either `http://
   www.mysite/blog` or `http://www.mysite`.
 * I generally use the wp-login.php trick (see [Moving WordPress](http://codex.wordpress.org/Moving_WordPress))
   so I don’t have to mess with the database. But either way is fine.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Proper Category and Tag base 301 redirection](https://wordpress.org/support/topic/proper-category-and-tag-base-301-redirection/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/proper-category-and-tag-base-301-redirection/#post-4166397)
 * I found the easiest way to to this is to use the WordPress [Redirection](http://wordpress.org/plugins/redirection/)
   plugin.
 * I added a new redirection for tag (from default “tag” to new “tag2”):
 *     ```
       Source URL: ^/tag/([a-z0-9_-]+)/$
       Match: URL only
       Action: Redirect to URL
       Regex: on
       Target URL: /tag2/{$1}/
       ```
   
 * You could also use the more common
 * Source URL: ^/tag/(.*)/$
 * if [a-z0-9_-] is too limiting.
 * Obviously change “tag2” with your new tag base. Should work for categories as
   well.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Best Way to Redirect 301](https://wordpress.org/support/topic/best-way-to-redirect-301/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/best-way-to-redirect-301/#post-4172884)
 * Did you remove this line?
 * `Redirect 301 / http://www.new-site.com/`
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Can't upload swf files to wordpress anymore.](https://wordpress.org/support/topic/cant-upload-swf-files-to-wordpress-anymore/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/cant-upload-swf-files-to-wordpress-anymore/#post-4172883)
 * The sample code in the previous post is incorrect. It replaces all other mime
   types with only swf and exe. It needs to add the missing types to the existing
   allowed mime types:
 *     ```
       function demo($mimes) {
       	if ( function_exists( 'current_user_can' ) )
       		$unfiltered = $user ? user_can( $user, 'unfiltered_html' ) : current_user_can( 'unfiltered_html' );
       	if ( !empty( $unfiltered ) ) {
       		$mimes['swf'] = 'application/x-shockwave-flash';
       	}
       	return $mimes;
       }
       add_filter('upload_mimes','demo');
       ```
   
 * I left out “exe” because that wasn’t asked for and I wouldn’t allow it normally.
   If you want that as well, just add this line:
 *     ```
       $mimes['exe'] = 'application/x-msdownload';
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Best Way to Redirect 301](https://wordpress.org/support/topic/best-way-to-redirect-301/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/best-way-to-redirect-301/#post-4172880)
 * No, but you should be able to use this (to the top of .htaccess file) if the 
   page names and directory structure are identical, with the only difference being
   the domain name:
 *     ```
       RewriteEngine On
   
       # Redirect Entire Site to New Domain
       RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR]
       RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L]
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Best Way to Redirect 301](https://wordpress.org/support/topic/best-way-to-redirect-301/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/best-way-to-redirect-301/#post-4172876)
 * It’ll depend on what web server your old site is using, but the easiest way to
   find out is to create a file:
 * `.htaccess`
 * and put it in the root of your web directory (on your old server).
 * Just add this one line (replacing “new-site” with the domain of your actual new
   site):
 *     ```
       Redirect 301 / http://www.new-site.com/
       ```
   
 * You can FTP the file up to your old server if need be, but check if your old 
   server already has an .htaccess file (since it starts with a dot, it might be
   hidden from view).
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Can't modify Header Woe's](https://wordpress.org/support/topic/cant-modify-header-woes/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/cant-modify-header-woes/#post-4172469)
 * You can alway try the [Safe Mode](http://wordpress.org/plugins/safe-mode/) plugin,
   but I think we’re pretty sure it’s a theme issue. But this would at least guarantee
   it’s the theme or a plugin (it deactivates plugins and changes to a default theme,
   if one is available, on a per page request basis).
 * Actually changing the theme temporarily and leaving plugins as is would at least
   tell you for certain that it’s the theme. If theme is not being maintained, it’s
   highly likely that it’s the problem. I’d also worry about security at some point
   if it’s not being updated. (and of course WordPress core and plugins need to 
   be kept up to date)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Best Way to Redirect 301](https://wordpress.org/support/topic/best-way-to-redirect-301/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/best-way-to-redirect-301/#post-4172867)
 * You need to set redirects or rewrites in the .htaccess of your old site.
 * [301 .htaccess Redirect](http://ndesign-studio.com/blog/301-htaccess-redirect)
 * [How do I redirect my site using a .htaccess file?](https://kb.mediatemple.net/questions/242/How+do+I+redirect+my+site+using+a+.htaccess+file%3F)
 * [301 Redirects](http://css-tricks.com/snippets/htaccess/301-redirects/)
 * [Htaccess Redirect 301 Guide For SEO’s](http://www.lionseo.com/blog/htaccess-redirect-301/)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [database repair](https://wordpress.org/support/topic/database-repair-12/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/database-repair-12/#post-4172842)
 * Generally that means your tables are corrupted.
 * See [Rebuilding or Repairing Tables or Indexes](http://dev.mysql.com/doc/refman/5.0/en/rebuilding-tables.html)
 * Restoring from backup may work as well.
 * Before attempting a repair, make a backup first.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Can't modify Header Woe's](https://wordpress.org/support/topic/cant-modify-header-woes/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/cant-modify-header-woes/#post-4172458)
 * Have you tried switching to a default WordPress theme? If the error goes away
   at least then you would know it’s definitely a problem with the theme. If that
   doesn’t work, try disabling all your plugins as well. It could be possible something
   is trying to set a header (often it’s setting a cookie) after the headers have
   been sent but during output of HTML.
 * You could comment our line 2284, but it may not actually be the cause of the 
   problem, especially if it’s not a white space issue.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Can't modify Header Woe's](https://wordpress.org/support/topic/cant-modify-header-woes/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/cant-modify-header-woes/#post-4172426)
 * When you say there’s no space between the two I assume you mean the line with
   the if statement and the final line with the closing tag. If so, it’s fine to
   have space in between, there just can’t be any space after the closing ‘?>’ on
   the final line.
 * This is the most normal culprit, though certainly not the only one.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Limit RSS Feeds to s Specific Number of Words](https://wordpress.org/support/topic/limit-rss-feeds-to-s-specific-number-of-words/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/limit-rss-feeds-to-s-specific-number-of-words/#post-4172423)
 * It can go anywhere in the theme’s functions.php as long as it’s not inside any
   other functions in the file. I generally just put it near the top above the other
   code. (and best to make a backup)
 * Looks like your code snippet will limit to 4 words, not 40, though should see
   what needs to be changed.
 * Also, have you tried setting feeds to use a summary instead of full text, set
   in Settings->Reading?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to add a filter for this Real State Theme?](https://wordpress.org/support/topic/how-to-add-a-filter-for-this-real-state-theme/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/how-to-add-a-filter-for-this-real-state-theme/#post-4171965)
 * Have you checked with the theme author?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [What is this code called?: %username%](https://wordpress.org/support/topic/what-is-this-code-called-username/)
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/what-is-this-code-called-username/#post-4171500)
 * In WordPress, they’re called (and used as) [Structure Tags](http://codex.wordpress.org/Using_Permalinks).

Viewing 15 replies - 316 through 330 (of 520 total)

[←](https://wordpress.org/support/users/scriptrunner/replies/page/21/?output_format=md)
[1](https://wordpress.org/support/users/scriptrunner/replies/?output_format=md) 
[2](https://wordpress.org/support/users/scriptrunner/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/scriptrunner/replies/page/3/?output_format=md)…
[21](https://wordpress.org/support/users/scriptrunner/replies/page/21/?output_format=md)
22 [23](https://wordpress.org/support/users/scriptrunner/replies/page/23/?output_format=md)…
[33](https://wordpress.org/support/users/scriptrunner/replies/page/33/?output_format=md)
[34](https://wordpress.org/support/users/scriptrunner/replies/page/34/?output_format=md)
[35](https://wordpress.org/support/users/scriptrunner/replies/page/35/?output_format=md)
[→](https://wordpress.org/support/users/scriptrunner/replies/page/23/?output_format=md)